[FFmpeg-cvslog] lavf/segment: abort in case of invalid segment format options

Stefano Sabatini git at videolan.org
Mon Sep 8 15:24:09 CEST 2014


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Mon Sep  8 12:47:37 2014 +0200| [f51de9cac2fd71a8eb04a6ce6e8ed0dfc7038a68] | committer: Stefano Sabatini

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f51de9cac2fd71a8eb04a6ce6e8ed0dfc7038a68
---

 libavformat/segment.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/segment.c b/libavformat/segment.c
index 00e5881..f35bbef 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);



More information about the ffmpeg-cvslog mailing list