[Ffmpeg-cvslog] CVS: ffmpeg/libavformat mov.c,1.134,1.135

Baptiste Coudurier CVS bcoudurier
Fri Mar 24 17:52:59 CET 2006


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

Modified Files:
	mov.c 
Log Message:
fix demuxing of CDR-Dinner_LAN_800k.mp4

Index: mov.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/mov.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- mov.c	24 Mar 2006 16:01:00 -0000	1.134
+++ mov.c	24 Mar 2006 16:52:56 -0000	1.135
@@ -946,12 +946,18 @@
                 (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff, (format >> 24) & 0xff,
                 st->codec->codec_type);
         st->codec->codec_tag = format;
-        /* codec_type is set earlier by read_hdlr */
-        if(st->codec->codec_type==CODEC_TYPE_VIDEO) {
-            /* for MPEG4: set codec type by looking for it */
+        id = codec_get_id(mov_audio_tags, format);
+        if (id > 0) {
+            st->codec->codec_type = CODEC_TYPE_AUDIO;
+        } else if (format != MKTAG('m', 'p', '4', 's')) { /* skip old asf mpeg4 tag */
             id = codec_get_id(mov_video_tags, format);
-            if(id <= 0)
+            if (id <= 0)
                 id = codec_get_id(codec_bmp_tags, format);
+            if (id > 0)
+                st->codec->codec_type = CODEC_TYPE_VIDEO;
+        }
+
+        if(st->codec->codec_type==CODEC_TYPE_VIDEO) {
             st->codec->codec_id = id;
             get_be16(pb); /* version */
             get_be16(pb); /* revision level */
@@ -1058,7 +1064,7 @@
         } else if(st->codec->codec_type==CODEC_TYPE_AUDIO) {
             uint16_t version = get_be16(pb);
 
-            st->codec->codec_id = codec_get_id(mov_audio_tags, format);
+            st->codec->codec_id = id;
             get_be16(pb); /* revision level */
             get_be32(pb); /* vendor */
 





More information about the ffmpeg-cvslog mailing list