diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-04-04 11:30:18 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-04-09 10:34:18 +0200 |
commit | f2c919252da460f89f7281c769d3005e35d95b85 (patch) | |
tree | e102ca4dca0f61aa0b0295d235e21e36e6a2fd49 /fftools/ffmpeg_mux_init.c | |
parent | bfeb751171c87e81fa940f4152b1e72eb9b0a1c0 (diff) | |
download | ffmpeg-f2c919252da460f89f7281c769d3005e35d95b85.tar.gz |
fftools/ffmpeg_filter: accept encoder thread count through OutputFilterOptions
Stop digging through encoder options manually.
Will allow decoupling filtering from encoding in future commits.
Diffstat (limited to 'fftools/ffmpeg_mux_init.c')
-rw-r--r-- | fftools/ffmpeg_mux_init.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index ffcc20a504..10421ae1b0 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -1370,6 +1370,7 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type, if (ost->enc && (type == AVMEDIA_TYPE_VIDEO || type == AVMEDIA_TYPE_AUDIO)) { + const AVDictionaryEntry *e; char name[16]; OutputFilterOptions opts = { .enc = enc, @@ -1395,6 +1396,10 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type, snprintf(name, sizeof(name), "#%d:%d", mux->of.index, ost->index); + e = av_dict_get(ost->encoder_opts, "threads", NULL, 0); + if (e) + opts.nb_threads = e->value; + // MJPEG encoder exports a full list of supported pixel formats, // but the full-range ones are experimental-only. // Restrict the auto-conversion list unless -strict experimental |