changeset 990:f7394f02e95a libavformat

ftyp patch by (Baptiste COUDURIER <baptiste.coudurier smartjog com)
author michael
date Thu, 02 Mar 2006 19:28:35 +0000
parents e4eb95d550ca
children 30b54c043135
files movenc.c
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/movenc.c	Thu Mar 02 14:50:31 2006 +0000
+++ b/movenc.c	Thu Mar 02 19:28:35 2006 +0000
@@ -1316,8 +1316,10 @@
         put_tag(pb, "3g2a");
     else if ( mov->mode == MODE_PSP )
         put_tag(pb, "MSNV");
+    else if ( mov->mode == MODE_MP4 )
+        put_tag(pb, "isom");
     else
-        put_tag(pb, "isom");
+        put_tag(pb, "qt  ");
 
     put_be32(pb, 0x200 );
 
@@ -1327,8 +1329,10 @@
         put_tag(pb, "3g2a");
     else if ( mov->mode == MODE_PSP )
         put_tag(pb, "MSNV");
+    else if ( mov->mode == MODE_MP4 )
+        put_tag(pb, "mp41");
     else
-        put_tag(pb, "mp41");
+        put_tag(pb, "qt  ");
 }
 
 static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s)
@@ -1398,9 +1402,7 @@
         else if (!strcmp("mov", s->oformat->name)) mov->mode = MODE_MOV;
         else if (!strcmp("psp", s->oformat->name)) mov->mode = MODE_PSP;
 
-        if ( mov->mode == MODE_3GP || mov->mode == MODE_3G2 ||
-             mov->mode == MODE_MP4 || mov->mode == MODE_PSP )
-            mov_write_ftyp_tag(pb,s);
+        mov_write_ftyp_tag(pb,s);
         if ( mov->mode == MODE_PSP ) {
             if ( s->nb_streams != 2 ) {
                 av_log(s, AV_LOG_ERROR, "PSP mode need one video and one audio stream\n");