mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avformat/hlsenc: move the warning message from every segment upload to init part
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
parent
f267a2ac9c
commit
07b4bf5f11
@ -290,7 +290,6 @@ static void set_http_options(AVFormatContext *s, AVDictionary **options, HLSCont
|
|||||||
if (c->method) {
|
if (c->method) {
|
||||||
av_dict_set(options, "method", c->method, 0);
|
av_dict_set(options, "method", c->method, 0);
|
||||||
} else if (http_base_proto) {
|
} 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);
|
av_dict_set(options, "method", "PUT", 0);
|
||||||
}
|
}
|
||||||
if (c->user_agent)
|
if (c->user_agent)
|
||||||
@ -2673,6 +2672,7 @@ static int hls_init(AVFormatContext *s)
|
|||||||
const char *vtt_pattern = "%d.vtt";
|
const char *vtt_pattern = "%d.vtt";
|
||||||
char *p = NULL;
|
char *p = NULL;
|
||||||
int vtt_basename_size = 0;
|
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;
|
int fmp4_init_filename_len = strlen(hls->fmp4_init_filename) + 1;
|
||||||
|
|
||||||
hls->has_default_key = 0;
|
hls->has_default_key = 0;
|
||||||
@ -2690,6 +2690,10 @@ static int hls_init(AVFormatContext *s)
|
|||||||
goto fail;
|
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);
|
ret = validate_name(hls->nb_varstreams, s->url);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user