[FFmpeg-cvslog] Support channel layout when demuxing aif files.

Carl Eugen Hoyos git at videolan.org
Sat Apr 23 10:31:42 CEST 2011


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat Apr 23 10:31:03 2011 +0200| [8f2e438e52d4a6cd138968df18cd9e54d7f6394f] | committer: Carl Eugen Hoyos

Support channel layout when demuxing aif files.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8f2e438e52d4a6cd138968df18cd9e54d7f6394f
---

 libavformat/Makefile  |    2 +-
 libavformat/aiffdec.c |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/libavformat/Makefile b/libavformat/Makefile
index 4587172..f83642f 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -23,7 +23,7 @@ OBJS-$(CONFIG_AC3_DEMUXER)               += ac3dec.o rawdec.o
 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
+OBJS-$(CONFIG_AIFF_DEMUXER)              += aiffdec.o riff.o pcm.o caf.o
 OBJS-$(CONFIG_AIFF_MUXER)                += aiffenc.o riff.o
 OBJS-$(CONFIG_AMR_DEMUXER)               += amr.o
 OBJS-$(CONFIG_AMR_MUXER)                 += amr.o
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 25a93f5..a3aecee 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -23,6 +23,7 @@
 #include "avformat.h"
 #include "pcm.h"
 #include "aiff.h"
+#include "caf.h"
 
 #define AIFF                    0
 #define AIFF_C_VERSION1         0xA2805140
@@ -253,6 +254,11 @@ static int aiff_read_header(AVFormatContext *s,
             st->codec->extradata_size = size;
             avio_read(pb, st->codec->extradata, size);
             break;
+        case MKTAG('C','H','A','N'):
+            if (size < 12)
+                return AVERROR_INVALIDDATA;
+            ff_read_chan_chunk(s, size, st->codec);
+            break;
         default: /* Jump */
             if (size & 1)   /* Always even aligned */
                 size++;



More information about the ffmpeg-cvslog mailing list