[Ffmpeg-cvslog] CVS: ffmpeg/libavformat avidec.c,1.82,1.83

Michael Niedermayer CVS michael
Wed Mar 1 13:04:24 CET 2006


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

Modified Files:
	avidec.c 
Log Message:
fix demuxing of XviD_with_3_AAC-HE_audio_streams.avi


Index: avidec.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/avidec.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- avidec.c	1 Mar 2006 11:41:16 -0000	1.82
+++ avidec.c	1 Mar 2006 12:04:22 -0000	1.83
@@ -203,7 +203,10 @@
             /* using frame_period is bad idea */
             frame_period = get_le32(pb);
             bit_rate = get_le32(pb) * 8;
-            url_fskip(pb, 4 * 4);
+            get_le32(pb);
+            avi->non_interleaved |= get_le32(pb) & AVIF_MUSTUSEINDEX;
+
+            url_fskip(pb, 2 * 4);
             n = get_le32(pb);
             for(i=0;i<n;i++) {
                 AVIStream *ast;
@@ -468,13 +471,12 @@
         if(i>=0){
             int64_t pos= best_st->index_entries[i].pos;
             pos += best_ast->packet_size - best_ast->remaining;
-            url_fseek(&s->pb, pos, SEEK_SET);
+            url_fseek(&s->pb, pos + 8, SEEK_SET);
 //        av_log(NULL, AV_LOG_DEBUG, "pos=%Ld\n", pos);
 
-            if(best_ast->remaining)
-                avi->stream_index= best_stream_index;
-            else
-                avi->stream_index= -1;
+            avi->stream_index= best_stream_index;
+            if(!best_ast->remaining)
+                best_ast->remaining= best_st->index_entries[i].size;
         }
     }
 





More information about the ffmpeg-cvslog mailing list