aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/hlsenc.c
diff options
context:
space:
mode:
authorSteven Liu <lq@chinaffmpeg.org>2019-09-06 12:10:15 +0800
committerSteven Liu <lq@chinaffmpeg.org>2019-09-06 12:29:56 +0800
commit07b4bf5f11e444cece5fcd5b637e3da3ecebb476 (patch)
tree1767f199b140a4c42a6d9b36fd745619e126ffaa /libavformat/hlsenc.c
parentf267a2ac9c740c77cee2f2c5fd2bd9bc048768b1 (diff)
downloadffmpeg-07b4bf5f11e444cece5fcd5b637e3da3ecebb476.tar.gz
avformat/hlsenc: move the warning message from every segment upload to init part
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r--libavformat/hlsenc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 52ee8941a1..216bb822d2 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -290,7 +290,6 @@ static void set_http_options(AVFormatContext *s, AVDictionary **options, HLSCont
if (c->method) {
av_dict_set(options, "method", c->method, 0);
} else if (http_base_proto) {
- av_log(c, AV_LOG_WARNING, "No HTTP method set, hls muxer defaulting to method PUT.\n");
av_dict_set(options, "method", "PUT", 0);
}
if (c->user_agent)
@@ -2673,6 +2672,7 @@ static int hls_init(AVFormatContext *s)
const char *vtt_pattern = "%d.vtt";
char *p = NULL;
int vtt_basename_size = 0;
+ int http_base_proto = ff_is_http_proto(s->url);
int fmp4_init_filename_len = strlen(hls->fmp4_init_filename) + 1;
hls->has_default_key = 0;
@@ -2690,6 +2690,10 @@ static int hls_init(AVFormatContext *s)
goto fail;
}
+ if (!hls->method && http_base_proto) {
+ av_log(c, AV_LOG_WARNING, "No HTTP method set, hls muxer defaulting to method PUT.\n");
+ }
+
ret = validate_name(hls->nb_varstreams, s->url);
if (ret < 0)
goto fail;