fftools/ffmpeg: drop OutputStream.is_cfr

It is used in a single place in the filtering code, so it is better to
inline it there.
This commit is contained in:
Anton Khirnov 2024-04-01 06:29:16 +02:00
parent 509afedaaf
commit 82c7c21b18
3 changed files with 1 additions and 3 deletions

View File

@ -551,7 +551,6 @@ typedef struct OutputStream {
/* video only */ /* video only */
AVRational frame_rate; AVRational frame_rate;
AVRational max_frame_rate; AVRational max_frame_rate;
int is_cfr;
int force_fps; int force_fps;
#if FFMPEG_OPT_TOP #if FFMPEG_OPT_TOP
int top_field_first; int top_field_first;

View File

@ -1956,7 +1956,7 @@ static int choose_out_timebase(OutputFilterPriv *ofp, AVFrame *frame)
fr = fr_sink; fr = fr_sink;
} }
if (ofilter->ost->is_cfr) { if (fps->vsync_method == VSYNC_CFR || fps->vsync_method == VSYNC_VSCFR) {
if (!fr.num && !fps->framerate_max.num) { if (!fr.num && !fps->framerate_max.num) {
fr = (AVRational){25, 1}; fr = (AVRational){25, 1};
av_log(ofilter->ost, AV_LOG_WARNING, av_log(ofilter->ost, AV_LOG_WARNING,

View File

@ -816,7 +816,6 @@ static int new_stream_video(Muxer *mux, const OptionsContext *o,
*vsync_method = VSYNC_VSCFR; *vsync_method = VSYNC_VSCFR;
} }
} }
ost->is_cfr = (*vsync_method == VSYNC_CFR || *vsync_method == VSYNC_VSCFR);
#if FFMPEG_OPT_VSYNC_DROP #if FFMPEG_OPT_VSYNC_DROP
if (*vsync_method == VSYNC_DROP) if (*vsync_method == VSYNC_DROP)
ms->ts_drop = 1; ms->ts_drop = 1;