[Ffmpeg-cvslog] CVS: ffmpeg/libavformat avidec.c,1.86,1.87

Michael Niedermayer CVS michael
Thu Mar 2 15:27:44 CET 2006


Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv27812

Modified Files:
	avidec.c 
Log Message:
fixing demuxing of minorityreport.AVI


Index: avidec.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/avidec.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- avidec.c	1 Mar 2006 16:11:04 -0000	1.86
+++ avidec.c	2 Mar 2006 14:27:41 -0000	1.87
@@ -403,6 +403,8 @@
                     break;
                 case CODEC_TYPE_AUDIO:
                     get_wav_header(pb, st->codec, size);
+                    if(ast->sample_size && st->codec->block_align && ast->sample_size % st->codec->block_align)
+                        av_log(s, AV_LOG_DEBUG, "invalid sample size or block align detected\n");
                     if (size%2) /* 2-aligned (fix for Stargate SG-1 - 3x18 - Shades of Grey.avi) */
                         url_fskip(pb, 1);
                     /* special case time: To support Xan DPCM, hardcode
@@ -522,7 +524,7 @@
         AVIStream *ast= st->priv_data;
         int size;
 
-        if(ast->sample_size == 0)
+        if(ast->sample_size <= 1) // minorityreport.AVI block_align=1024 sample_size=1 IMA-ADPCM
             size= INT_MAX;
         else if(ast->sample_size < 32)
             size= 64*ast->sample_size;
@@ -850,7 +852,7 @@
         if (st2->nb_index_entries <= 0)
             continue;
 
-//        assert(st2->codec.block_align);
+//        assert(st2->codec->block_align);
         assert(st2->time_base.den == ast2->rate);
         assert(st2->time_base.num == ast2->scale);
         index = av_index_search_timestamp(





More information about the ffmpeg-cvslog mailing list