X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fh261dec.c;h=ff3d05c5147399ea751470aa649e154cd0778a5c;hb=107f55cb01d2333541b8887194c487a6c6bc1ba1;hp=17abc64a6028f80f97c835772f0019fc9e06eca1;hpb=6d91045d835635fe889f684bdf77f68e00b15d0b;p=ffmpeg diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 17abc64a602..ff3d05c5147 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -97,7 +97,7 @@ static av_cold int h261_decode_init(AVCodecContext *avctx){ } /** - * decodes the group of blocks header or slice header. + * Decode the group of blocks header or slice header. * @return <0 if an error occurred */ static int h261_decode_gob_header(H261Context *h){ @@ -136,7 +136,7 @@ static int h261_decode_gob_header(H261Context *h){ if(s->qscale==0) { av_log(s->avctx, AV_LOG_ERROR, "qscale has forbidden 0 value\n"); - if (s->avctx->err_recognition & AV_EF_BITSTREAM) + if (s->avctx->err_recognition & (AV_EF_BITSTREAM | AV_EF_COMPLIANT)) return -1; } @@ -150,7 +150,7 @@ static int h261_decode_gob_header(H261Context *h){ } /** - * decodes the group of blocks / video packet header. + * Decode the group of blocks / video packet header. * @return <0 if no resync found */ static int ff_h261_resync(H261Context *h){ @@ -191,7 +191,7 @@ static int ff_h261_resync(H261Context *h){ } /** - * decodes skipped macroblocks + * Decode skipped macroblocks. * @return 0 */ static int h261_decode_mb_skipped(H261Context *h, int mba1, int mba2 ) @@ -355,7 +355,7 @@ intra: } /** - * decodes a macroblock + * Decode a macroblock. * @return <0 if an error occurred */ static int h261_decode_block(H261Context * h, DCTELEM * block, @@ -437,7 +437,7 @@ static int h261_decode_block(H261Context * h, DCTELEM * block, } /** - * decodes the H261 picture header. + * Decode the H.261 picture header. * @return <0 if no startcode found */ static int h261_decode_picture_header(H261Context *h){ @@ -572,6 +572,8 @@ retry: //we need to set current_picture_ptr before reading the header, otherwise we cannot store anyting im there if (s->current_picture_ptr == NULL || s->current_picture_ptr->f.data[0]) { int i= ff_find_unused_picture(s, 0); + if (i < 0) + return i; s->current_picture_ptr= &s->picture[i]; }