From 746350ea0f7bde1e9fd23270e104af8897197293 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 24 Jan 2014 16:28:39 +0100 Subject: [PATCH] avcodec/mpeg12dec: Make mpeg2_fast_decode_block_intra() more robust by breaking out on invalid vlcs Signed-off-by: Michael Niedermayer --- libavcodec/mpeg12dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 08e6bff56c..91346bf52b 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -613,7 +613,7 @@ static inline int mpeg2_fast_decode_block_intra(MpegEncContext *s, int16_t *bloc UPDATE_CACHE(re, &s->gb); GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); - if (level == 127) { + if (level >= 64) { break; } else if (level != 0) { scantable += run;