diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2005-09-17 08:15:07 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2005-09-17 08:15:07 +0000 |
commit | 357a28430a11c4b547b12e07a00c1286bdb56b2a (patch) | |
tree | 006981c1268d75c31f776f762fefca0d1d82e15b /libavcodec/h264.c | |
parent | 18ae520b72390694c75c0f8dd34a4f14827b99a6 (diff) | |
download | ffmpeg-357a28430a11c4b547b12e07a00c1286bdb56b2a.tar.gz |
check return value of decode_cabac_mb_dqp, it is INT_MIN on error.
fixes crash with http://stud4.tuwien.ac.at/~e0326863/ats/bbc-sample_small.mpg
and MPlayer's broken packetizer (but will not decode right of course).
Originally committed as revision 4595 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index efbf5322d7..925fb68089 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -6044,6 +6044,10 @@ decode_intra_mb: } h->last_qscale_diff = dqp = decode_cabac_mb_dqp( h ); + if( dqp == INT_MIN ){ + av_log(h->s.avctx, AV_LOG_ERROR, "cabac decode of qscale diff failed at %d %d\n", s->mb_x, s->mb_y); + return -1; + } s->qscale += dqp; if(((unsigned)s->qscale) > 51){ if(s->qscale<0) s->qscale+= 52; |