summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2020-02-02 22:58:08 +0100
committerMarton Balint <cus@passwd.hu>2020-02-03 21:42:35 +0100
commit3cdc71348e032cb51de8b240e2385fc55116c752 (patch)
treed5e5efd5aa7631090d7c36c54a905aac6d430a60 /libavformat
parentb93098253eceb8f7a7ba8486ba57dfb1cd190c54 (diff)
avformat/dashenc: use AV_OPT_TYPE_DICT for http_opts
This changes the separator character from comma to colon, but since this option was only added recently I think it should be done for consistency with other similar options. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/dashenc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 3b651b9514..9a8dde98e9 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -167,7 +167,7 @@ typedef struct DASHContext {
const char *utc_timing_url;
const char *method;
const char *user_agent;
- char *http_opts;
+ AVDictionary *http_opts;
int hls_playlist;
int http_persistent;
int master_playlist_created;
@@ -479,8 +479,7 @@ static void set_http_options(AVDictionary **options, DASHContext *c)
{
if (c->method)
av_dict_set(options, "method", c->method, 0);
- if (c->http_opts)
- av_dict_parse_string(options, c->http_opts, "=", ",", 0);
+ av_dict_copy(options, c->http_opts, 0);
if (c->user_agent)
av_dict_set(options, "user_agent", c->user_agent, 0);
if (c->http_persistent)
@@ -2273,7 +2272,7 @@ static const AVOption options[] = {
{ "mpd_profile", "Set profiles. Elements and values used in the manifest may be constrained by them", OFFSET(profile), AV_OPT_TYPE_FLAGS, {.i64 = MPD_PROFILE_DASH }, 0, UINT_MAX, E, "mpd_profile"},
{ "dash", "MPEG-DASH ISO Base media file format live profile", 0, AV_OPT_TYPE_CONST, {.i64 = MPD_PROFILE_DASH }, 0, UINT_MAX, E, "mpd_profile"},
{ "dvb_dash", "DVB-DASH profile", 0, AV_OPT_TYPE_CONST, {.i64 = MPD_PROFILE_DVB }, 0, UINT_MAX, E, "mpd_profile"},
- { "http_opts", "HTTP protocol options", OFFSET(http_opts), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E },
+ { "http_opts", "HTTP protocol options", OFFSET(http_opts), AV_OPT_TYPE_DICT, { .str = NULL }, 0, 0, E },
{ "target_latency", "Set desired target latency for Low-latency dash", OFFSET(target_latency), AV_OPT_TYPE_DURATION, { .i64 = 0 }, 0, INT_MAX, E },
{ NULL },
};