fftools/ffmpeg_mux_init: Fix leak when using non-encoding option

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-06-11 08:33:21 +02:00
parent 8754c9bd82
commit 6ae1a337f2
1 changed files with 1 additions and 0 deletions

View File

@ -3146,6 +3146,7 @@ static int validate_enc_avopt(Muxer *mux, const AVDictionary *codec_avopt)
if (!(option->flags & AV_OPT_FLAG_ENCODING_PARAM)) {
av_log(mux, AV_LOG_ERROR, "Codec AVOption %s (%s) is not an "
"encoding option.\n", e->key, option->help ? option->help : "");
av_dict_free(&unused_opts);
return AVERROR(EINVAL);
}