[FFmpeg-cvslog] fftools/ffmpeg: drop OutputStream.is_cfr

Anton Khirnov git at videolan.org
Tue Apr 9 11:54:29 EEST 2024


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Apr  1 06:29:16 2024 +0200| [82c7c21b1812928f8507a8c91a2070d41cac49ea] | committer: Anton Khirnov

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=82c7c21b1812928f8507a8c91a2070d41cac49ea
---

 fftools/ffmpeg.h          | 1 -
 fftools/ffmpeg_filter.c   | 2 +-
 fftools/ffmpeg_mux_init.c | 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index fa8f7d8324..16497105e1 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -551,7 +551,6 @@ typedef struct OutputStream {
     /* video only */
     AVRational frame_rate;
     AVRational max_frame_rate;
-    int is_cfr;
     int force_fps;
 #if FFMPEG_OPT_TOP
     int top_field_first;
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index d906b72576..022c42e9c7 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -1956,7 +1956,7 @@ static int choose_out_timebase(OutputFilterPriv *ofp, AVFrame *frame)
             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) {
             fr = (AVRational){25, 1};
             av_log(ofilter->ost, AV_LOG_WARNING,
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index 6ffa4b7491..1791905d7e 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -816,7 +816,6 @@ static int new_stream_video(Muxer *mux, const OptionsContext *o,
                 *vsync_method = VSYNC_VSCFR;
             }
         }
-        ost->is_cfr = (*vsync_method == VSYNC_CFR || *vsync_method == VSYNC_VSCFR);
 #if FFMPEG_OPT_VSYNC_DROP
         if (*vsync_method == VSYNC_DROP)
             ms->ts_drop = 1;



More information about the ffmpeg-cvslog mailing list