summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-20 02:14:54 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-20 02:14:54 +0100
commit48706f41e1a17e04b0aa09852eff021833708233 (patch)
treed33af96fedd771264c6717eacd2d54800bc05aff /libavcodec
parent9d35fa43eea1c0646a5f3e4ba537d58f574b9ca7 (diff)
parenta85ce653fb14ae968419453fabf1ffe10d1f15df (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: mpeg12: check for available bits to avoid an infinite loop fate: add some shorthands to run groups of tests fate: Give some tests more sensible names. cosmetics: Rename ffsink to avsink. Conflicts: avconv.c cmdutils.c cmdutils.h ffmpeg.c ffplay.c tests/fate/audio.mak tests/fate/demux.mak tests/fate/dpcm.mak tests/fate/image.mak tests/fate/lossless-audio.mak tests/fate/lossless-video.mak tests/fate/microsoft.mak tests/fate/pcm.mak tests/fate/real.mak tests/fate/screen.mak tests/fate/video.mak tests/fate/voice.mak tests/fate/wma.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg12.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index c4c611b8ac..e83c35c7ec 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1694,7 +1694,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
if (mb_y == 0 && s->codec_tag == AV_RL32("SLIF")) {
skip_bits1(&s->gb);
} else {
- for (;;) {
+ while (get_bits_left(&s->gb) > 0) {
int code = get_vlc2(&s->gb, mbincr_vlc.table, MBINCR_VLC_BITS, 2);
if (code < 0) {
av_log(s->avctx, AV_LOG_ERROR, "first mb_incr damaged\n");