diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2021-11-26 20:47:20 +0800 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2021-11-29 09:26:40 +0800 |
commit | 86a2123a6ea69f3f6d1e30c7cb35478ab3620a0d (patch) | |
tree | 47c29acc16d59f6c439e289f3ec04ef0223d01cd /libavfilter | |
parent | 0d924d6e5a4272149bd5ea87d63cbb6e67732345 (diff) | |
download | ffmpeg-86a2123a6ea69f3f6d1e30c7cb35478ab3620a0d.tar.gz |
avfilter/src_movie: add format_opts for the opened file
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/src_movie.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index 220a43cdd1..b89a680883 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -74,6 +74,7 @@ typedef struct MovieContext { int max_stream_index; /**< max stream # actually used for output */ MovieStream *st; /**< array of all streams, one per output */ int *out_index; /**< stream number -> output number map, or -1 */ + AVDictionary *format_opts; } MovieContext; #define OFFSET(x) offsetof(MovieContext, x) @@ -92,6 +93,7 @@ static const AVOption movie_options[]= { { "loop", "set loop count", OFFSET(loop_count), AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, FLAGS }, { "discontinuity", "set discontinuity threshold", OFFSET(discontinuity_threshold), AV_OPT_TYPE_DURATION, {.i64 = 0}, 0, INT64_MAX, FLAGS }, { "dec_threads", "set the number of threads for decoding", OFFSET(dec_threads), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS }, + { "format_opts", "set format options for the opened file", OFFSET(format_opts), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0, FLAGS}, { NULL }, }; @@ -243,7 +245,7 @@ static av_cold int movie_common_init(AVFilterContext *ctx) iformat = movie->format_name ? av_find_input_format(movie->format_name) : NULL; movie->format_ctx = NULL; - if ((ret = avformat_open_input(&movie->format_ctx, movie->file_name, iformat, NULL)) < 0) { + if ((ret = avformat_open_input(&movie->format_ctx, movie->file_name, iformat, &movie->format_opts)) < 0) { av_log(ctx, AV_LOG_ERROR, "Failed to avformat_open_input '%s'\n", movie->file_name); return ret; |