[Ffmpeg-devel] [PATCH] uncheck qscale diff can cause crash
Reimar Döffinger
Reimar.Doeffinger
Sat Sep 17 01:21:02 CEST 2005
Hi,
On Sat, Sep 17, 2005 at 12:45:32AM +0200, Michael Niedermayer wrote:
> > Just asking since I will be on holiday
> > from sunday on, so I won't be available for question/applying/whatever
> > then...
>
> well, iff the spec says that values outside this range are illegal then apply
> it
No way I'm gonna read the spec today :-).
But luckily I don't have to, the real problem is that the
decode_cabac_mb_dqp function returns INT_MIN on error and
that just wasn't caught.
Okay to apply this version?
Is there some error counter variable it should increase?
Or alternatively, set the qscale difference to 0 instead of escaping?
Greetings,
Reimar D??ffinger
-------------- next part --------------
Index: libavcodec/h264.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h264.c,v
retrieving revision 1.154
diff -u -r1.154 h264.c
--- libavcodec/h264.c 10 Sep 2005 01:13:10 -0000 1.154
+++ libavcodec/h264.c 16 Sep 2005 23:19:16 -0000
@@ -6044,6 +6044,10 @@
}
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;
More information about the ffmpeg-devel
mailing list