summaryrefslogtreecommitdiff
path: root/libavformat/segment.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2014-09-08 12:47:37 +0200
committerStefano Sabatini <stefasab@gmail.com>2014-09-08 15:22:55 +0200
commitf51de9cac2fd71a8eb04a6ce6e8ed0dfc7038a68 (patch)
tree42517a1011c7d18e008fb5e613f762e4f2838d4a /libavformat/segment.c
parente9c08e32d6b97cb7bfec29b38b3394be46dc3e70 (diff)
lavf/segment: abort in case of invalid segment format options
Diffstat (limited to 'libavformat/segment.c')
-rw-r--r--libavformat/segment.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c
index 00e5881d5a..f35bbef8dc 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -662,8 +662,10 @@ static int seg_write_header(AVFormatContext *s)
if (av_dict_count(options)) {
av_log(s, AV_LOG_ERROR,
"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) {
avio_close(oc->pb);
goto fail;
@@ -681,6 +683,7 @@ static int seg_write_header(AVFormatContext *s)
}
fail:
+ av_dict_free(&options);
if (ret) {
if (seg->list)
avio_close(seg->list_pb);