You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
avformat/iamf_writer: disallow Opus extradata with mapping family other than 0
Clause 3.11.1 of IAMF[1] states the Opus ID Header should conform to ChannelMappingFamily == 0.
[1]https://aomediacodec.github.io/iamf/#opus-specific
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 2aab4e4cc0
)
This commit is contained in:
@ -39,7 +39,7 @@ static int update_extradata(IAMFCodecConfig *codec_config)
|
|||||||
|
|
||||||
switch(codec_config->codec_id) {
|
switch(codec_config->codec_id) {
|
||||||
case AV_CODEC_ID_OPUS:
|
case AV_CODEC_ID_OPUS:
|
||||||
if (codec_config->extradata_size < 19)
|
if (codec_config->extradata_size != 19)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
codec_config->extradata_size -= 8;
|
codec_config->extradata_size -= 8;
|
||||||
AV_WB8(codec_config->extradata + 0, AV_RL8(codec_config->extradata + 8)); // version
|
AV_WB8(codec_config->extradata + 0, AV_RL8(codec_config->extradata + 8)); // version
|
||||||
|
Reference in New Issue
Block a user