summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2017-09-20 03:31:48 +0200
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2017-09-20 03:31:48 +0200
commitb4093e60c51af493a6dad7819264ef769736227f (patch)
treea125588e37150443b2323af71c79bddf95d04ca1 /libavformat
parente428e5ded6266d8e68cecbd9953fdaba55b097e1 (diff)
downloadffmpeg-streaming-b4093e60c51af493a6dad7819264ef769736227f.zip
ffmpeg-streaming-b4093e60c51af493a6dad7819264ef769736227f.tar.gz
lavf/caf: Support demuxing Opus.
Introduced in macOS High Sierra and iOS 11.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/caf.c1
-rw-r--r--libavformat/cafdec.c2
-rw-r--r--libavformat/cafenc.c1
-rw-r--r--libavformat/version.h2
4 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/caf.c b/libavformat/caf.c
index 8d39415..fe242ff 100644
--- a/libavformat/caf.c
+++ b/libavformat/caf.c
@@ -52,6 +52,7 @@ const AVCodecTag ff_codec_caf_tags[] = {
{ AV_CODEC_ID_MP2, MKTAG('.','m','p','2') },
{ AV_CODEC_ID_MP3, MKTAG('.','m','p','3') },
{ AV_CODEC_ID_MP3, MKTAG('m','s', 0 ,'U') },
+ { AV_CODEC_ID_OPUS, MKTAG('o','p','u','s') },
{ AV_CODEC_ID_PCM_ALAW, MKTAG('a','l','a','w') },
{ AV_CODEC_ID_PCM_MULAW, MKTAG('u','l','a','w') },
{ AV_CODEC_ID_QCELP, MKTAG('Q','c','l','p') },
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index 19939d3..4e47add 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -166,6 +166,8 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size)
}
avio_skip(pb, size - ALAC_NEW_KUKI);
}
+ } else if (st->codecpar->codec_id == AV_CODEC_ID_OPUS) {
+ avio_skip(pb, size);
} else {
av_freep(&st->codecpar->extradata);
if (ff_get_extradata(s, st->codecpar, pb, size) < 0)
diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c
index 7aa9e8c..f550cd9 100644
--- a/libavformat/cafenc.c
+++ b/libavformat/cafenc.c
@@ -117,6 +117,7 @@ static int caf_write_header(AVFormatContext *s)
switch (par->codec_id) {
case AV_CODEC_ID_AAC:
+ case AV_CODEC_ID_OPUS:
av_log(s, AV_LOG_ERROR, "muxing codec currently unsupported\n");
return AVERROR_PATCHWELCOME;
}
diff --git a/libavformat/version.h b/libavformat/version.h
index aeb5940..499aecf 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -33,7 +33,7 @@
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 57
#define LIBAVFORMAT_VERSION_MINOR 82
-#define LIBAVFORMAT_VERSION_MICRO 100
+#define LIBAVFORMAT_VERSION_MICRO 101
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
OpenPOWER on IntegriCloud