diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-29 01:55:53 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-29 02:09:35 +0400 |
commit | f0b26bf0f56e3e727e62be1b63d6fc087b319443 (patch) | |
tree | 1456f4a4e4623f0ce346b5c96521a354c2a5e7d2 /libavcodec | |
parent | f87a2e1272b61edaf903d60a4c4bcede36e3d508 (diff) |
avcodec/dvdec: dont try to decode ac when theres no input
fixes reading out of an empty bitstream
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dvdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index b86926a5a7..c46c2fff32 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -237,7 +237,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg) flush_put_bits(&vs_pb); for (mb_index = 0; mb_index < 5; mb_index++) { for (j = 0; j < s->sys->bpm; j++) { - if (mb->pos < 64) { + if (mb->pos < 64 && get_bits_left(&gb) > 0) { av_dlog(avctx, "start %d:%d\n", mb_index, j); dv_decode_ac(&gb, mb, block); } |