diff mbox

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

Message ID 20170706182842.7785-9-derek.buitenhuis@gmail.com
State Accepted
Commit 2d417076a2a7e7d15c239cd63646dae27ed5c126
Headers show

Commit Message

Derek Buitenhuis July 6, 2017, 6:28 p.m. UTC
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
---
 libavformat/hlsenc.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Steven Liu July 6, 2017, 10:29 p.m. UTC | #1
2017-07-07 2:28 GMT+08:00 Derek Buitenhuis <derek.buitenhuis@gmail.com>:
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@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
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


LGTM


Thanks
Steven Liu July 7, 2017, 2:11 a.m. UTC | #2
2017-07-07 6:29 GMT+08:00 Steven Liu <lingjiujianke@gmail.com>:
> 2017-07-07 2:28 GMT+08:00 Derek Buitenhuis <derek.buitenhuis@gmail.com>:
>> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@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
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
> LGTM
>
>
> Thanks

applied


Thanks
diff mbox

Patch

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);