[FFmpeg-cvslog] fftools/ffmpeg_mux_init: don't free the AVDictionaryEntry until after it's been used
James Almer
git at videolan.org
Mon Jan 22 18:48:54 EET 2024
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Jan 22 13:46:30 2024 -0300| [d2eb6f4d44d262be32c212a3d06ad8ad78f2a239] | committer: James Almer
fftools/ffmpeg_mux_init: don't free the AVDictionaryEntry until after it's been used
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d2eb6f4d44d262be32c212a3d06ad8ad78f2a239
---
fftools/ffmpeg_mux_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index 15200c5a7d..6b5e4f8b3c 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -2145,7 +2145,6 @@ static int of_parse_iamf_submixes(Muxer *mux, AVStreamGroup *stg, char *ptr)
if (e = av_dict_get(dict, "stg", NULL, 0))
idx = strtoll(e->value, &endptr, 0);
- av_dict_set(&dict, "stg", NULL, 0);
if (!endptr || *endptr || idx < 0 || idx >= oc->nb_stream_groups - 1 ||
oc->stream_groups[idx]->type != AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT) {
av_log(mux, AV_LOG_ERROR, "Invalid or missing stream group index in "
@@ -2166,6 +2165,7 @@ static int of_parse_iamf_submixes(Muxer *mux, AVStreamGroup *stg, char *ptr)
av_iamf_param_definition_alloc(AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN, 0, NULL);
if (!submix_element->element_mix_config)
ret = AVERROR(ENOMEM);
+ av_dict_set(&dict, "stg", NULL, 0);
av_opt_set_dict2(submix_element, &dict, AV_OPT_SEARCH_CHILDREN);
} else if (layout) {
AVIAMFSubmixLayout *submix_layout = av_iamf_submix_add_layout(submix);
More information about the ffmpeg-cvslog
mailing list