mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 00:32:31 +00:00
avformat/iamf_writer: reject duplicated stream ids in a stream group
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
257bc2a82a
commit
6b6a0fc53d
@ -275,6 +275,17 @@ int ff_iamf_add_audio_element(IAMFContext *iamf, const AVStreamGroup *stg, void
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < audio_element->nb_substreams; i++) {
|
||||
for (int j = i + 1; j < audio_element->nb_substreams; j++)
|
||||
if (audio_element->substreams[i].audio_substream_id ==
|
||||
audio_element->substreams[j].audio_substream_id) {
|
||||
av_log(log_ctx, AV_LOG_ERROR, "Duplicate id %u in streams %u and %u from stream group %u\n",
|
||||
audio_element->substreams[i].audio_substream_id, i, j, stg->index);
|
||||
ret = AVERROR(EINVAL);
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
if (iamf_audio_element->demixing_info) {
|
||||
AVIAMFParamDefinition *param = iamf_audio_element->demixing_info;
|
||||
const IAMFParamDefinition *param_definition = ff_iamf_get_param_definition(iamf, param->parameter_id);
|
||||
|
Loading…
Reference in New Issue
Block a user