Commit 9416b810 authored by reimar's avatar reimar

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).


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4595 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d9962be4
...@@ -6044,6 +6044,10 @@ decode_intra_mb: ...@@ -6044,6 +6044,10 @@ decode_intra_mb:
} }
h->last_qscale_diff = dqp = decode_cabac_mb_dqp( h ); 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; s->qscale += dqp;
if(((unsigned)s->qscale) > 51){ if(((unsigned)s->qscale) > 51){
if(s->qscale<0) s->qscale+= 52; if(s->qscale<0) s->qscale+= 52;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment