[FFmpeg-cvslog] r15336 - trunk/libavcodec/mpegaudiodec.c

michael subversion
Tue Sep 16 02:31:32 CEST 2008


Author: michael
Date: Tue Sep 16 02:31:32 2008
New Revision: 15336

Log:
Make decoder more robust by default against broken encoders.
Fixes issue540.


Modified:
   trunk/libavcodec/mpegaudiodec.c

Modified: trunk/libavcodec/mpegaudiodec.c
==============================================================================
--- trunk/libavcodec/mpegaudiodec.c	(original)
+++ trunk/libavcodec/mpegaudiodec.c	Tue Sep 16 02:31:32 2008
@@ -1599,7 +1599,7 @@ static int huffman_decode(MPADecodeConte
     /* skip extension bits */
     bits_left = end_pos2 - get_bits_count(&s->gb);
 //av_log(NULL, AV_LOG_ERROR, "left:%d buf:%p\n", bits_left, s->in_gb.buffer);
-    if (bits_left < 0/* || bits_left > 500*/) {
+    if (bits_left < 0 && s->error_recognition >= FF_ER_COMPLIANT) {
         av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left);
         s_index=0;
     }else if(bits_left > 0 && s->error_recognition >= FF_ER_AGGRESSIVE){




More information about the ffmpeg-cvslog mailing list