summaryrefslogtreecommitdiffstats
path: root/libavformat/hlsenc.c
diff options
context:
space:
mode:
authorSteven Liu <lq@chinaffmpeg.org>2018-12-12 15:37:01 +0800
committerSteven Liu <lq@chinaffmpeg.org>2018-12-24 13:25:58 +0800
commitcdbf8847ea97a985dfd55432e1384bb7fe5d2d3b (patch)
tree5fc78318228ca054535a37ab8fa20a1ace32c45a /libavformat/hlsenc.c
parent7d5bb3a4d34f0cddd300252f8afc37c3d7bf17c8 (diff)
downloadffmpeg-streaming-cdbf8847ea97a985dfd55432e1384bb7fe5d2d3b.zip
ffmpeg-streaming-cdbf8847ea97a985dfd55432e1384bb7fe5d2d3b.tar.gz
avformat/hlsenc: remove duplicate operation at hls_write_header
the options have set when avformat_init_output at hls_mux_init Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r--libavformat/hlsenc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index bdd2a11..03a32b6 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -787,7 +787,7 @@ static int hls_mux_init(AVFormatContext *s, VariantStream *vs)
av_dict_copy(&options, hls->format_options, 0);
av_dict_set(&options, "fflags", "-autobsf", 0);
- av_dict_set(&options, "movflags", "frag_custom+dash+delay_moov", 0);
+ av_dict_set(&options, "movflags", "+frag_custom+dash+delay_moov", AV_DICT_APPEND);
ret = avformat_init_output(oc, &options);
if (ret < 0)
return ret;
@@ -2079,15 +2079,9 @@ static int hls_write_header(AVFormatContext *s)
for (i = 0; i < hls->nb_varstreams; i++) {
vs = &hls->var_streams[i];
- av_dict_copy(&options, hls->format_options, 0);
- ret = avformat_write_header(vs->avf, &options);
- if (av_dict_count(options)) {
- av_log(s, AV_LOG_ERROR, "Some of provided format options in '%s' are not recognized\n", hls->format_options_str);
- ret = AVERROR(EINVAL);
- av_dict_free(&options);
- goto fail;
- }
- av_dict_free(&options);
+ ret = avformat_write_header(vs->avf, NULL);
+ if (ret < 0)
+ return ret;
//av_assert0(s->nb_streams == hls->avf->nb_streams);
for (j = 0; j < vs->nb_streams; j++) {
AVStream *inner_st;
OpenPOWER on IntegriCloud