From e274113292ac2a135cd6aea790631693670fe961 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sun, 19 Jun 2016 18:51:39 +0200 Subject: lavc/cafenc: Allow QDMC muxing. --- libavformat/caf.c | 2 +- libavformat/cafenc.c | 3 ++- libavformat/version.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/caf.c b/libavformat/caf.c index 00854615ca..c05fb8087c 100644 --- a/libavformat/caf.c +++ b/libavformat/caf.c @@ -55,7 +55,7 @@ const AVCodecTag ff_codec_caf_tags[] = { { AV_CODEC_ID_PCM_MULAW, MKTAG('u','l','a','w') }, { AV_CODEC_ID_QCELP, MKTAG('Q','c','l','p') }, { AV_CODEC_ID_QDM2, MKTAG('Q','D','M','2') }, - { AV_CODEC_ID_QDM2, MKTAG('Q','D','M','C') }, + { AV_CODEC_ID_QDMC, MKTAG('Q','D','M','C') }, /* currently unsupported codecs */ /*{ AC-3 over S/PDIF MKTAG('c','a','c','3') },*/ /*{ MPEG4CELP MKTAG('c','e','l','p') },*/ 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); diff --git a/libavformat/version.h b/libavformat/version.h index 30fe43b6d5..3dc79ff774 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -33,7 +33,7 @@ // Also please add any ticket numbers that you belive might regress here #define LIBAVFORMAT_VERSION_MAJOR 57 #define LIBAVFORMAT_VERSION_MINOR 38 -#define LIBAVFORMAT_VERSION_MICRO 100 +#define LIBAVFORMAT_VERSION_MICRO 101 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ -- cgit v1.2.3