Commit 7f852962 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpeg12dec: print the amount of overread

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f9bd6d61
...@@ -1949,8 +1949,10 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, ...@@ -1949,8 +1949,10 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
} }
} }
eos: // end of slice 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; return AVERROR_INVALIDDATA;
}
*buf += (get_bits_count(&s->gb) - 1) / 8; *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); 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; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment