Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/cafenc.c')
-rw-r--r--libavformat/cafenc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c
index 0f33c6b592..13636f30ee 100644
--- a/libavformat/cafenc.c
+++ b/libavformat/cafenc.c
@@ -134,7 +134,11 @@ static int caf_write_header(AVFormatContext *s)
avio_wb32(pb, enc->channels); //< mChannelsPerFrame
avio_wb32(pb, enc->bits_per_coded_sample); //< mBitsPerChannel
- ff_mov_write_chan(s, enc->channel_layout, "chan");
+ if (enc->channel_layout) {
+ ffio_wfourcc(pb, "chan");
+ avio_wb64(pb, 12);
+ ff_mov_write_chan(pb, enc->channel_layout);
+ }
ffio_wfourcc(pb, "data"); //< Audio Data chunk
caf->data = avio_tell(pb);