encode_lavc: fix memory leak on --ofopts=help

Found by OSS-Fuzz.
This commit is contained in:
Kacper Michajłow 2024-11-01 14:10:20 +01:00
parent e96bffe7a8
commit bc9d982330
1 changed files with 1 additions and 1 deletions

View File

@ -546,7 +546,7 @@ bool encode_lavc_showhelp(struct mp_log *log, struct encode_opts *opts)
encode_lavc_printoptions(log, c, " --ofopts=", " ", NULL, encode_lavc_printoptions(log, c, " --ofopts=", " ", NULL,
AV_OPT_FLAG_ENCODING_PARAM, AV_OPT_FLAG_ENCODING_PARAM,
AV_OPT_FLAG_ENCODING_PARAM); AV_OPT_FLAG_ENCODING_PARAM);
av_free(c); avformat_free_context(c);
void *iter = NULL; void *iter = NULL;
while ((format = av_muxer_iterate(&iter))) { while ((format = av_muxer_iterate(&iter))) {
if (format->priv_class) { if (format->priv_class) {