aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg12dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-01 21:06:13 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-01 21:06:13 +0200
commit7f852962dc6aa681a7c5107d17ad4da03c4fb2ce (patch)
tree7abc4e971cabb4a349d2a539d513f9c2f6312147 /libavcodec/mpeg12dec.c
parentf9bd6d61bcc158b2fa36089771c042fa1f074e9c (diff)
downloadffmpeg-7f852962dc6aa681a7c5107d17ad4da03c4fb2ce.tar.gz
avcodec/mpeg12dec: print the amount of overread
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index fcc1d4c48b..e78c54942b 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;