Skip to content

Commit b4093e6

Browse files
committed
lavf/caf: Support demuxing Opus.
Introduced in macOS High Sierra and iOS 11.
1 parent e428e5d commit b4093e6

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

libavformat/caf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const AVCodecTag ff_codec_caf_tags[] = {
5252
{ AV_CODEC_ID_MP2, MKTAG('.','m','p','2') },
5353
{ AV_CODEC_ID_MP3, MKTAG('.','m','p','3') },
5454
{ AV_CODEC_ID_MP3, MKTAG('m','s', 0 ,'U') },
55+
{ AV_CODEC_ID_OPUS, MKTAG('o','p','u','s') },
5556
{ AV_CODEC_ID_PCM_ALAW, MKTAG('a','l','a','w') },
5657
{ AV_CODEC_ID_PCM_MULAW, MKTAG('u','l','a','w') },
5758
{ AV_CODEC_ID_QCELP, MKTAG('Q','c','l','p') },

libavformat/cafdec.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size)
166166
}
167167
avio_skip(pb, size - ALAC_NEW_KUKI);
168168
}
169+
} else if (st->codecpar->codec_id == AV_CODEC_ID_OPUS) {
170+
avio_skip(pb, size);
169171
} else {
170172
av_freep(&st->codecpar->extradata);
171173
if (ff_get_extradata(s, st->codecpar, pb, size) < 0)

libavformat/cafenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ static int caf_write_header(AVFormatContext *s)
117117

118118
switch (par->codec_id) {
119119
case AV_CODEC_ID_AAC:
120+
case AV_CODEC_ID_OPUS:
120121
av_log(s, AV_LOG_ERROR, "muxing codec currently unsupported\n");
121122
return AVERROR_PATCHWELCOME;
122123
}

libavformat/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
// Also please add any ticket numbers that you believe might be affected here
3434
#define LIBAVFORMAT_VERSION_MAJOR 57
3535
#define LIBAVFORMAT_VERSION_MINOR 82
36-
#define LIBAVFORMAT_VERSION_MICRO 100
36+
#define LIBAVFORMAT_VERSION_MICRO 101
3737

3838
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
3939
LIBAVFORMAT_VERSION_MINOR, \

0 commit comments

Comments
 (0)