[FFmpeg-cvslog] avcodec/mpeg12dec: print the amount of overread
Michael Niedermayer
git at videolan.org
Fri Aug 1 21:20:28 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Aug 1 21:06:13 2014 +0200| [7f852962dc6aa681a7c5107d17ad4da03c4fb2ce] | committer: Michael Niedermayer
avcodec/mpeg12dec: print the amount of overread
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7f852962dc6aa681a7c5107d17ad4da03c4fb2ce
---
libavcodec/mpeg12dec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index fcc1d4c..e78c549 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1949,8 +1949,10 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
}
}
eos: // end of slice
- if (get_bits_left(&s->gb) < 0)
+ if (get_bits_left(&s->gb) < 0) {
+ av_log(s, AV_LOG_ERROR, "overread %d\n", -get_bits_left(&s->gb));
return AVERROR_INVALIDDATA;
+ }
*buf += (get_bits_count(&s->gb) - 1) / 8;
av_dlog(s, "y %d %d %d %d\n", s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y);
return 0;
More information about the ffmpeg-cvslog
mailing list