Commit f51de9ca authored by Stefano Sabatini's avatar Stefano Sabatini

lavf/segment: abort in case of invalid segment format options

parent e9c08e32
...@@ -662,8 +662,10 @@ static int seg_write_header(AVFormatContext *s) ...@@ -662,8 +662,10 @@ static int seg_write_header(AVFormatContext *s)
if (av_dict_count(options)) { if (av_dict_count(options)) {
av_log(s, AV_LOG_ERROR, av_log(s, AV_LOG_ERROR,
"Some of the provided format options in '%s' are not recognized\n", seg->format_options_str); "Some of the provided format options in '%s' are not recognized\n", seg->format_options_str);
ret = AVERROR(EINVAL);
goto fail;
} }
av_dict_free(&options);
if (ret < 0) { if (ret < 0) {
avio_close(oc->pb); avio_close(oc->pb);
goto fail; goto fail;
...@@ -681,6 +683,7 @@ static int seg_write_header(AVFormatContext *s) ...@@ -681,6 +683,7 @@ static int seg_write_header(AVFormatContext *s)
} }
fail: fail:
av_dict_free(&options);
if (ret) { if (ret) {
if (seg->list) if (seg->list)
avio_close(seg->list_pb); avio_close(seg->list_pb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment