diff options
author | James Almer <jamrial@gmail.com> | 2024-02-29 14:41:21 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-03-04 21:14:05 -0300 |
commit | 56d630e6c2ae3033a124133c42308b5edbd0fc98 (patch) | |
tree | 34689231795bfa8d198b5a8558d26187028fa74c /libavformat/iamf.h | |
parent | 97e1480c8cb8a7e94f89589b58d3246e578a976b (diff) | |
download | ffmpeg-56d630e6c2ae3033a124133c42308b5edbd0fc98.tar.gz |
avformat/iamf_writer: update extradata from packet side data
Some encoders, like flac, propagate updated extradata at the end of encoding
as packet side data. Use it to update the relevant codec_config.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/iamf.h')
-rw-r--r-- | libavformat/iamf.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavformat/iamf.h b/libavformat/iamf.h index d8715b7333..d662f6e76b 100644 --- a/libavformat/iamf.h +++ b/libavformat/iamf.h @@ -165,6 +165,19 @@ struct IAMFSoundSystemMap { extern const AVChannelLayout ff_iamf_scalable_ch_layouts[10]; extern const struct IAMFSoundSystemMap ff_iamf_sound_system_map[13]; +static inline IAMFCodecConfig *ff_iamf_get_codec_config(const IAMFContext *c, + unsigned int codec_config_id) +{ + IAMFCodecConfig *codec_config = NULL; + + for (int i = 0; i < c->nb_codec_configs; i++) { + if (c->codec_configs[i]->codec_config_id == codec_config_id) + codec_config = c->codec_configs[i]; + } + + return codec_config; +} + static inline IAMFParamDefinition *ff_iamf_get_param_definition(const IAMFContext *iamf, unsigned int parameter_id) { |