[FFmpeg-cvslog] avcodec/mpeg12dec: Make mpeg2_fast_decode_block_intra() more robust by breaking out on invalid vlcs

Michael Niedermayer git at videolan.org
Fri Jan 24 18:38:53 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jan 24 16:28:39 2014 +0100| [746350ea0f7bde1e9fd23270e104af8897197293] | committer: Michael Niedermayer

avcodec/mpeg12dec: Make mpeg2_fast_decode_block_intra() more robust by breaking out on invalid vlcs

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=746350ea0f7bde1e9fd23270e104af8897197293
---

 libavcodec/mpeg12dec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 08e6bff..91346bf 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;



More information about the ffmpeg-cvslog mailing list