aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-08-25 10:08:41 +0200
committerAnton Khirnov <anton@khirnov.net>2022-08-29 15:42:11 +0200
commit0dd7347963041667e07366c83460fda8f19f4037 (patch)
treecd0850d9f8e021379ad4cb2d8018445507c2270e
parentd0f767f81f7b6c4e9a3d29a9fd622ab519461213 (diff)
downloadffmpeg-0dd7347963041667e07366c83460fda8f19f4037.tar.gz
fftools/ffmpeg: drop OutputStream.fps_mode
It is only used within new_video_stream(), so make it a local variable there.
-rw-r--r--fftools/ffmpeg.h1
-rw-r--r--fftools/ffmpeg_opt.c8
2 files changed, 4 insertions, 5 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 937a65b8e8..74bc9220fc 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -528,7 +528,6 @@ typedef struct OutputStream {
AVRational max_frame_rate;
enum VideoSyncMethod vsync_method;
int is_cfr;
- const char *fps_mode;
int force_fps;
int top_field_first;
int rotate_overridden;
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 296751e19d..b387684daf 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1875,7 +1875,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
if (ost->enc_ctx) {
AVCodecContext *video_enc = ost->enc_ctx;
- const char *p = NULL;
+ const char *p = NULL, *fps_mode = NULL;
char *frame_size = NULL;
char *frame_pix_fmt = NULL;
char *intra_matrix = NULL, *inter_matrix = NULL;
@@ -2027,9 +2027,9 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
MATCH_PER_STREAM_OPT(top_field_first, i, ost->top_field_first, oc, st);
ost->vsync_method = video_sync_method;
- MATCH_PER_STREAM_OPT(fps_mode, str, ost->fps_mode, oc, st);
- if (ost->fps_mode)
- parse_and_set_vsync(ost->fps_mode, &ost->vsync_method, ost->file_index, ost->index, 0);
+ MATCH_PER_STREAM_OPT(fps_mode, str, fps_mode, oc, st);
+ if (fps_mode)
+ parse_and_set_vsync(fps_mode, &ost->vsync_method, ost->file_index, ost->index, 0);
if (ost->vsync_method == VSYNC_AUTO) {
if (!strcmp(oc->oformat->name, "avi")) {