diff options
author | Dustin Brody <libav@parsoma.net> | 2011-07-27 19:09:45 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-07-28 15:23:07 -0700 |
commit | 2a11952f457658d58303c8e5b4e10fb4599eef4f (patch) | |
tree | e69efccf96406741ed195677d1e38327547725c9 /libavcodec/h263dec.c | |
parent | f5f004bc5a40e5a5de62bd5e2818ab5de7f6bf21 (diff) | |
download | ffmpeg-2a11952f457658d58303c8e5b4e10fb4599eef4f.tar.gz |
h263dec: Propagate AV_LOG_ERRORs from slice decoding through frame decoding with sufficient error recognition
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r-- | libavcodec/h263dec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 6eea8def11..a19e55c6ac 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -638,7 +638,7 @@ retry: s->mb_x=0; s->mb_y=0; - decode_slice(s); + ret = decode_slice(s); while(s->mb_y<s->mb_height){ if(s->msmpeg4_version){ if(s->slice_height==0 || s->mb_x!=0 || (s->mb_y%s->slice_height)!=0 || get_bits_count(&s->gb) > s->gb.size_in_bits) @@ -654,7 +654,7 @@ retry: if(s->msmpeg4_version<4 && s->h263_pred) ff_mpeg4_clean_buffers(s); - decode_slice(s); + if (decode_slice(s) < 0) ret = AVERROR_INVALIDDATA; } if (s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type==AV_PICTURE_TYPE_I) @@ -722,7 +722,7 @@ assert(s->current_picture.pict_type == s->pict_type); av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time); #endif - return get_consumed_bytes(s, buf_size); + return (ret && avctx->error_recognition >= FF_ER_EXPLODE)?ret:get_consumed_bytes(s, buf_size); } AVCodec ff_h263_decoder = { |