mirror of https://git.videolan.org/git/ffmpeg.git
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:
parent
8754c9bd82
commit
6ae1a337f2
|
@ -3146,6 +3146,7 @@ static int validate_enc_avopt(Muxer *mux, const AVDictionary *codec_avopt)
|
||||||
if (!(option->flags & AV_OPT_FLAG_ENCODING_PARAM)) {
|
if (!(option->flags & AV_OPT_FLAG_ENCODING_PARAM)) {
|
||||||
av_log(mux, AV_LOG_ERROR, "Codec AVOption %s (%s) is not an "
|
av_log(mux, AV_LOG_ERROR, "Codec AVOption %s (%s) is not an "
|
||||||
"encoding option.\n", e->key, option->help ? option->help : "");
|
"encoding option.\n", e->key, option->help ? option->help : "");
|
||||||
|
av_dict_free(&unused_opts);
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue