summaryrefslogtreecommitdiff
path: root/libavformat/cafenc.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2016-06-19 18:51:39 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2016-06-19 18:51:39 +0200
commite274113292ac2a135cd6aea790631693670fe961 (patch)
treef81bb8c64ae7f5b43a05bc1bc38134a25ab8f2ce /libavformat/cafenc.c
parent5f5a97dc3d291d2dba63b8cbefd4d6e8b3a9db16 (diff)
lavc/cafenc: Allow QDMC muxing.
Diffstat (limited to 'libavformat/cafenc.c')
-rw-r--r--libavformat/cafenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c
index f2d7ec90b1..5ea8e69cc8 100644
--- a/libavformat/cafenc.c
+++ b/libavformat/cafenc.c
@@ -87,6 +87,7 @@ static uint32_t samples_per_packet(enum AVCodecID codec_id, int channels, int bl
case AV_CODEC_ID_AC3:
return 1536;
case AV_CODEC_ID_QDM2:
+ case AV_CODEC_ID_QDMC:
return 2048 * channels;
case AV_CODEC_ID_ALAC:
return 4096;
@@ -169,7 +170,7 @@ static int caf_write_header(AVFormatContext *s)
avio_wb16(pb, 0x81FF); /* Mode set (all modes for AMR_NB) */
avio_w8(pb, 0x00); /* Mode change period (no restriction) */
avio_w8(pb, 0x01); /* Frames per sample */
- } else if (par->codec_id == AV_CODEC_ID_QDM2) {
+ } else if (par->codec_id == AV_CODEC_ID_QDM2 || par->codec_id == AV_CODEC_ID_QDMC) {
ffio_wfourcc(pb, "kuki");
avio_wb64(pb, par->extradata_size);
avio_write(pb, par->extradata, par->extradata_size);