diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-02-13 12:18:27 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-02-21 10:27:20 +0100 |
commit | 826cfd9997ff0d27ec120700330854b58d3d9848 (patch) | |
tree | e675a0e3a89cccbfdade9e5ce55fa0667c33903d /fftools/ffmpeg_filter.c | |
parent | fef3052df3166c477f4ab5311f4ee2e18d0296de (diff) | |
download | ffmpeg-826cfd9997ff0d27ec120700330854b58d3d9848.tar.gz |
fftools/ffmpeg_filter: pass framerate through InputFilterOptions
Rather than read it directly from InputStream.
This is a step towards avoiding the assumption that filtergraph inputs
are always fed by demuxers.
Diffstat (limited to 'fftools/ffmpeg_filter.c')
-rw-r--r-- | fftools/ffmpeg_filter.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 56aa3edd78..dc65b441a6 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -1486,7 +1486,7 @@ static int configure_input_video_filter(FilterGraph *fg, AVFilterGraph *graph, const AVFilter *buffer_filt = avfilter_get_by_name("buffer"); const AVPixFmtDescriptor *desc; InputStream *ist = ifp->ist; - AVRational fr = ist->framerate; + AVRational fr = ifp->opts.framerate; AVRational sar; AVBPrint args; char name[255]; @@ -1495,14 +1495,11 @@ static int configure_input_video_filter(FilterGraph *fg, AVFilterGraph *graph, if (!par) return AVERROR(ENOMEM); - if (!fr.num) - fr = ist->framerate_guessed; - if (ifp->type_src == AVMEDIA_TYPE_SUBTITLE) sub2video_prepare(ifp); - ifp->time_base = ist->framerate.num ? av_inv_q(ist->framerate) : - ist->st->time_base; + ifp->time_base = (ifp->opts.flags & IFILTER_FLAG_CFR) ? + av_inv_q(ifp->opts.framerate) : ist->st->time_base; sar = ifp->sample_aspect_ratio; if(!sar.den) |