[FFmpeg-devel] [PATCH 08/12] hlsenc: Add missing error check

Derek Buitenhuis derek.buitenhuis at gmail.com
Thu Jul 6 21:28:38 EEST 2017


Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
---
 libavformat/hlsenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index dd6a62b13c..b3b52da369 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -602,6 +602,8 @@ static int hls_mux_init(AVFormatContext *s)
         av_dict_set(&options, "fflags", "-autobsf", 0);
         av_dict_set(&options, "movflags", "frag_custom+dash+delay_moov", 0);
         ret = avformat_init_output(oc, &options);
+        if (ret < 0)
+            return ret;
         if (av_dict_count(options)) {
             av_log(s, AV_LOG_ERROR, "Some of the provided format options in '%s' are not recognized\n", hls->format_options_str);
             av_dict_free(&options);
-- 
2.11.0



More information about the ffmpeg-devel mailing list