From 26f86eaf03be9acf95676f67897b75f7f0c40238 Mon Sep 17 00:00:00 2001
From: Baptiste Coudurier <baptiste.coudurier@smartjog.com>
Date: Thu, 2 Mar 2006 19:28:35 +0000
Subject: [PATCH] ftyp patch by (Baptiste COUDURIER <baptiste.coudurier
 smartjog com)

Originally committed as revision 5098 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavformat/movenc.c          | 12 +++++++-----
 tests/ffmpeg.regression.ref   |  4 ++--
 tests/libav.regression.ref    |  4 ++--
 tests/rotozoom.regression.ref |  4 ++--
 4 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 5a00971154c..8dfe04c04a3 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1316,8 +1316,10 @@ static void mov_write_ftyp_tag (ByteIOContext *pb, AVFormatContext *s)
         put_tag(pb, "3g2a");
     else if ( mov->mode == MODE_PSP )
         put_tag(pb, "MSNV");
-    else
+    else if ( mov->mode == MODE_MP4 )
         put_tag(pb, "isom");
+    else
+        put_tag(pb, "qt  ");
 
     put_be32(pb, 0x200 );
 
@@ -1327,8 +1329,10 @@ static void mov_write_ftyp_tag (ByteIOContext *pb, AVFormatContext *s)
         put_tag(pb, "3g2a");
     else if ( mov->mode == MODE_PSP )
         put_tag(pb, "MSNV");
-    else
+    else if ( mov->mode == MODE_MP4 )
         put_tag(pb, "mp41");
+    else
+        put_tag(pb, "qt  ");
 }
 
 static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s)
@@ -1398,9 +1402,7 @@ static int mov_write_header(AVFormatContext *s)
         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");
diff --git a/tests/ffmpeg.regression.ref b/tests/ffmpeg.regression.ref
index 3bbf46a0150..2fcd70fe04b 100644
--- a/tests/ffmpeg.regression.ref
+++ b/tests/ffmpeg.regression.ref
@@ -137,8 +137,8 @@ stddev:  0.00 PSNR:99.99 bytes:7602176
 7200000 ./data/a-dv.dv
 c2082cd8adf417c4ebc32654e446cba1 *./data/out.yuv
 stddev:  8.86 PSNR:29.17 bytes:7602176
-733d55faec85f437f534771c145973d2 *./data/a-svq1.mov
-1379827 ./data/a-svq1.mov
+979057a09f280acd2fba3b29de6125d1 *./data/a-svq1.mov
+1379847 ./data/a-svq1.mov
 bbff871d1475e1eee4231a08e075de2c *./data/out.yuv
 stddev: 10.99 PSNR:27.30 bytes:7602176
 21f8ff9f1daacd9133683bb4ea0f50a4 *./data/a-mp2.mp2
diff --git a/tests/libav.regression.ref b/tests/libav.regression.ref
index 55981ecbe66..5297408c603 100644
--- a/tests/libav.regression.ref
+++ b/tests/libav.regression.ref
@@ -22,8 +22,8 @@ c9050b51f6d6636cdda3160d43463bc3 *./data/b-libav.ts
 794934a02582f8dfc85d1856514cf37c *./data/b-libav.flv
  339325 ./data/b-libav.flv
 ./data/b-libav.flv CRC=0x7b9076f8
-4eecc0b7b09a6696f6d0f811f637612e *./data/b-libav.mov
- 369873 ./data/b-libav.mov
+63e05396e2d52135c4025ce14eb090a9 *./data/b-libav.mov
+369893 ./data/b-libav.mov
 ./data/b-libav.mov CRC=0x48f5a90d
 8bf16d40a2ec19fa36b124a928e47e23 *./data/b-libav.nut
  332358 ./data/b-libav.nut
diff --git a/tests/rotozoom.regression.ref b/tests/rotozoom.regression.ref
index 1209dffe0cd..3e63e737ec6 100644
--- a/tests/rotozoom.regression.ref
+++ b/tests/rotozoom.regression.ref
@@ -137,8 +137,8 @@ stddev:  0.00 PSNR:99.99 bytes:7602176
 7200000 ./data/a-dv.dv
 bb69dda7a84a5b166434e28e1243d3d1 *./data/out.yuv
 stddev:  2.99 PSNR:38.59 bytes:7602176
-e4896d19f536c420cb17fac162d1f95b *./data/a-svq1.mov
-769527 ./data/a-svq1.mov
+2905eb59262b093335b31df9f252c488 *./data/a-svq1.mov
+769547 ./data/a-svq1.mov
 44777d1ddbccd0ef7f8d08394465670c *./data/out.yuv
 stddev:  3.44 PSNR:37.38 bytes:7602176
 21f8ff9f1daacd9133683bb4ea0f50a4 *./data/a-mp2.mp2
-- 
GitLab