[FFmpeg-cvslog] Write channel_layout for multichannel aif files.
Carl Eugen Hoyos
git at videolan.org
Tue May 17 01:59:06 CEST 2011
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue May 17 01:56:01 2011 +0200| [f2962ac8ad353c12d81bc515a01427f0912b4a69] | committer: Carl Eugen Hoyos
Write channel_layout for multichannel aif files.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f2962ac8ad353c12d81bc515a01427f0912b4a69
---
libavformat/Makefile | 2 +-
libavformat/aiffenc.c | 7 +++++++
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 26c094c..13fe237 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -24,7 +24,7 @@ OBJS-$(CONFIG_AC3_MUXER) += rawenc.o
OBJS-$(CONFIG_ADTS_MUXER) += adtsenc.o
OBJS-$(CONFIG_AEA_DEMUXER) += aea.o pcm.o
OBJS-$(CONFIG_AIFF_DEMUXER) += aiffdec.o riff.o pcm.o isom.o
-OBJS-$(CONFIG_AIFF_MUXER) += aiffenc.o riff.o
+OBJS-$(CONFIG_AIFF_MUXER) += aiffenc.o riff.o isom.o
OBJS-$(CONFIG_AMR_DEMUXER) += amr.o
OBJS-$(CONFIG_AMR_MUXER) += amr.o
OBJS-$(CONFIG_ANM_DEMUXER) += anm.o
diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c
index cc3cbc4..34ab0cc 100644
--- a/libavformat/aiffenc.c
+++ b/libavformat/aiffenc.c
@@ -22,6 +22,7 @@
#include "avformat.h"
#include "aiff.h"
#include "avio_internal.h"
+#include "isom.h"
typedef struct {
int64_t form;
@@ -61,6 +62,12 @@ static int aiff_write_header(AVFormatContext *s)
avio_wb32(pb, 0xA2805140);
}
+ if (enc->channels > 2 && enc->channel_layout) {
+ ffio_wfourcc(pb, "CHAN");
+ avio_wb32(pb, 12);
+ ff_mov_write_chan(pb, enc->channel_layout);
+ }
+
/* Common chunk */
ffio_wfourcc(pb, "COMM");
avio_wb32(pb, aifc ? 24 : 18); /* size */
More information about the ffmpeg-cvslog
mailing list