[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec h264.c,1.150,1.151
Michael Niedermayer CVS
michael
Thu Aug 25 02:01:59 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv3928
Modified Files:
h264.c
Log Message:
prevent assert failures and infinite loops with broken streams
Index: h264.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h264.c,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -d -r1.150 -r1.151
--- h264.c 14 Aug 2005 15:42:39 -0000 1.150
+++ h264.c 25 Aug 2005 00:01:57 -0000 1.151
@@ -5363,6 +5363,8 @@
else
ctx = 3;
val++;
+ if(val > 52) //prevent infinite loop
+ return INT_MIN;
}
if( val&0x01 )
@@ -6548,7 +6550,7 @@
bS[0] = bS[1] = bS[2] = bS[3] = 3;
} else {
// TODO
- assert(0);
+ av_log(h->s.avctx, AV_LOG_ERROR, "both non intra (TODO)\n");
}
/* Filter edge */
// Do not use s->qscale as luma quantizer because it has not the same
@@ -6569,7 +6571,7 @@
bS[0] = bS[1] = bS[2] = bS[3] = 3;
} else {
// TODO
- assert(0);
+ av_log(h->s.avctx, AV_LOG_ERROR, "both non intra (TODO)\n");
}
/* Filter edge */
// Do not use s->qscale as luma quantizer because it has not the same
@@ -6701,7 +6703,7 @@
if(ret>=0) ret = decode_mb_cabac(h);
- hl_decode_mb(h);
+ if(ret>=0) hl_decode_mb(h);
s->mb_y--;
}
eos = get_cabac_terminate( &h->cabac );
More information about the ffmpeg-cvslog
mailing list