diff options
author | Marton Balint <cus@passwd.hu> | 2019-12-25 00:58:24 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2020-01-01 20:41:34 +0100 |
commit | 59172164f3bbfd38152d7fb4d10d899311359bd1 (patch) | |
tree | dd20a8ea4b0e2321aa7accda0886d424c5bbac5f | |
parent | 3670a10c2d69dfb125ad1fe53fe8eddd9a687166 (diff) | |
download | ffmpeg-59172164f3bbfd38152d7fb4d10d899311359bd1.tar.gz |
avformat/dashenc: use AV_OPT_TYPE_DICT for format_options
Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r-- | libavformat/dashenc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 8c28fb6b6e..b84736881f 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -142,7 +142,7 @@ typedef struct DASHContext { int streaming; int64_t timeout; int index_correction; - char *format_options_str; + AVDictionary *format_options; int global_sidx; SegmentType segment_type_option; /* segment type as specified in options */ int ignore_io_errors; @@ -1303,11 +1303,7 @@ static int dash_init(AVFormatContext *s) return ret; os->init_start_pos = 0; - if (c->format_options_str) { - ret = av_dict_parse_string(&opts, c->format_options_str, "=", ":", 0); - if (ret < 0) - return ret; - } + av_dict_copy(&opts, c->format_options, 0); if (os->segment_type == SEGMENT_TYPE_MP4) { if (c->streaming) @@ -1931,7 +1927,7 @@ static const AVOption options[] = { { "streaming", "Enable/Disable streaming mode of output. Each frame will be moof fragment", OFFSET(streaming), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, E }, { "timeout", "set timeout for socket I/O operations", OFFSET(timeout), AV_OPT_TYPE_DURATION, { .i64 = -1 }, -1, INT_MAX, .flags = E }, { "index_correction", "Enable/Disable segment index correction logic", OFFSET(index_correction), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, E }, - { "format_options","set list of options for the container format (mp4/webm) used for dash", OFFSET(format_options_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, + { "format_options","set list of options for the container format (mp4/webm) used for dash", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0, E}, { "global_sidx", "Write global SIDX atom. Applicable only for single file, mp4 output, non-streaming mode", OFFSET(global_sidx), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, E }, { "dash_segment_type", "set dash segment files type", OFFSET(segment_type_option), AV_OPT_TYPE_INT, {.i64 = SEGMENT_TYPE_AUTO }, 0, SEGMENT_TYPE_NB - 1, E, "segment_type"}, { "auto", "select segment file format based on codec", 0, AV_OPT_TYPE_CONST, {.i64 = SEGMENT_TYPE_AUTO }, 0, UINT_MAX, E, "segment_type"}, |