aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2012-05-30 17:51:12 -0700
committerAlex Converse <alex.converse@gmail.com>2012-06-04 10:08:31 -0700
commit41e9682af22336bd08a5906629731c0c32aa00c6 (patch)
treed2ae289fbb697d8614c798396041c901d3f7bce5
parent84e430dd7b75215757554f2c4a47a212ea51d85f (diff)
downloadffmpeg-41e9682af22336bd08a5906629731c0c32aa00c6.tar.gz
movenc: Write chan atom for all audio tracks in mov mode movies.
-rw-r--r--libavformat/movenc.c4
-rw-r--r--tests/ref/fate/acodec-alac4
-rw-r--r--tests/ref/fate/acodec-pcm-s16be4
-rw-r--r--tests/ref/fate/acodec-pcm-s24be4
-rw-r--r--tests/ref/fate/acodec-pcm-s32be4
-rw-r--r--tests/ref/fate/acodec-pcm-s84
-rw-r--r--tests/ref/lavf/mov4
7 files changed, 15 insertions, 13 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index fa6e95771e..bf888bc3be 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -390,7 +390,6 @@ static int mov_write_wave_tag(AVIOContext *pb, MOVTrack *track)
} else if (track->enc->codec_id == CODEC_ID_AMR_NB) {
mov_write_amr_tag(pb, track);
} else if (track->enc->codec_id == CODEC_ID_AC3) {
- mov_write_chan_tag(pb, track);
mov_write_ac3_tag(pb, track);
} else if (track->enc->codec_id == CODEC_ID_ALAC) {
mov_write_extradata_tag(pb, track);
@@ -638,6 +637,9 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track)
else if (track->vos_len > 0)
mov_write_glbl_tag(pb, track);
+ if (track->mode == MODE_MOV && track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
+ mov_write_chan_tag(pb, track);
+
return update_size(pb, pos);
}
diff --git a/tests/ref/fate/acodec-alac b/tests/ref/fate/acodec-alac
index 10ff21133c..bb7a20242d 100644
--- a/tests/ref/fate/acodec-alac
+++ b/tests/ref/fate/acodec-alac
@@ -1,4 +1,4 @@
-238759bcb462fe9697973f4dd04d5b54 *tests/data/fate/acodec-alac.mov
-389234 tests/data/fate/acodec-alac.mov
+8ad790d3a0bbda81cd23c15ab8ba760d *tests/data/fate/acodec-alac.mov
+389258 tests/data/fate/acodec-alac.mov
64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-alac.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/fate/acodec-pcm-s16be b/tests/ref/fate/acodec-pcm-s16be
index f76e89c7a4..06614e1067 100644
--- a/tests/ref/fate/acodec-pcm-s16be
+++ b/tests/ref/fate/acodec-pcm-s16be
@@ -1,4 +1,4 @@
-53c9eb319c778e7ce137667f62384994 *tests/data/fate/acodec-pcm-s16be.mov
-1060073 tests/data/fate/acodec-pcm-s16be.mov
+b023c4792bd206fa96f64a8a012b6eb8 *tests/data/fate/acodec-pcm-s16be.mov
+1060097 tests/data/fate/acodec-pcm-s16be.mov
64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s16be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/fate/acodec-pcm-s24be b/tests/ref/fate/acodec-pcm-s24be
index 51972cae03..c6a5889134 100644
--- a/tests/ref/fate/acodec-pcm-s24be
+++ b/tests/ref/fate/acodec-pcm-s24be
@@ -1,4 +1,4 @@
-af8acd2f08e4bbebe7f4bea4d6f59dd6 *tests/data/fate/acodec-pcm-s24be.mov
-1589273 tests/data/fate/acodec-pcm-s24be.mov
+3607f8c7029a0c2ca2c8bf2c929518b3 *tests/data/fate/acodec-pcm-s24be.mov
+1589297 tests/data/fate/acodec-pcm-s24be.mov
64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s24be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/fate/acodec-pcm-s32be b/tests/ref/fate/acodec-pcm-s32be
index f2b6c447fa..8d77642b6b 100644
--- a/tests/ref/fate/acodec-pcm-s32be
+++ b/tests/ref/fate/acodec-pcm-s32be
@@ -1,4 +1,4 @@
-63f0e22b4f7c5d61d75047d85f140d52 *tests/data/fate/acodec-pcm-s32be.mov
-2118473 tests/data/fate/acodec-pcm-s32be.mov
+2a47292543cb0c25583a49397504e6d1 *tests/data/fate/acodec-pcm-s32be.mov
+2118497 tests/data/fate/acodec-pcm-s32be.mov
64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s32be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/fate/acodec-pcm-s8 b/tests/ref/fate/acodec-pcm-s8
index b471b2c241..2689bf286a 100644
--- a/tests/ref/fate/acodec-pcm-s8
+++ b/tests/ref/fate/acodec-pcm-s8
@@ -1,4 +1,4 @@
-4b3013a3f3c328ecdb617cd88b3fe836 *tests/data/fate/acodec-pcm-s8.mov
-530873 tests/data/fate/acodec-pcm-s8.mov
+953eb563c7ea81c1ec73c5a806975e34 *tests/data/fate/acodec-pcm-s8.mov
+530897 tests/data/fate/acodec-pcm-s8.mov
651d4eb8d98dfcdda96ae6c43d8f156b *tests/data/fate/acodec-pcm-s8.out.wav
stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400
diff --git a/tests/ref/lavf/mov b/tests/ref/lavf/mov
index a4ae2d5532..2db01d4aeb 100644
--- a/tests/ref/lavf/mov
+++ b/tests/ref/lavf/mov
@@ -1,3 +1,3 @@
-6c5472152b46e070ae6da359838e1f86 *./tests/data/lavf/lavf.mov
-357717 ./tests/data/lavf/lavf.mov
+a5c982910b1a1547db68ffa35cc2a05a *./tests/data/lavf/lavf.mov
+357741 ./tests/data/lavf/lavf.mov
./tests/data/lavf/lavf.mov CRC=0x2f6a9b26