aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-15 13:22:03 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-15 13:22:03 +0100
commit81230e2612a9c88e5b35ed2f67d828450cc50abf (patch)
treee678c6cc3f8c4090ceece6cd69d0fd9952ee877f /libavcodec
parentd408d3dbc3c5fbcf571735fd02f328776d4eafbe (diff)
downloadffmpeg-81230e2612a9c88e5b35ed2f67d828450cc50abf.tar.gz
avcodec/msmpeg4dec: print error in case of invalid vlc in msmpeg4_decode_dc for version <=2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/msmpeg4dec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c
index 7c260fe50e..d689b18572 100644
--- a/libavcodec/msmpeg4dec.c
+++ b/libavcodec/msmpeg4dec.c
@@ -586,8 +586,10 @@ static int msmpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr)
} else {
level = get_vlc2(&s->gb, v2_dc_chroma_vlc.table, DC_VLC_BITS, 3);
}
- if (level < 0)
+ if (level < 0) {
+ av_log(s->avctx, AV_LOG_ERROR, "illegal dc vlc\n");
return -1;
+ }
level-=256;
}else{ //FIXME optimize use unified tables & index
if (n < 4) {