X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fh261dec.c;h=66ea4be2a10fa7c4b98f442e2f4810ec50868447;hb=17ae608127324cabd083202a32a8dc210d30c3a1;hp=81f7dc680e4ace7c041cc7293f24f85eeb2906ee;hpb=9abc98737fe12ee67ddb7d52e9d497d4de2bac6c;p=ffmpeg diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 81f7dc680e4..66ea4be2a10 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){ @@ -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]; }