summaryrefslogtreecommitdiff
path: root/fftools
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-12-04 15:03:07 +0100
committerAnton Khirnov <anton@khirnov.net>2021-12-07 11:23:45 +0100
commit6ce954642878d792ee1f628e0f871763f07efe72 (patch)
tree21ed13207dcdd9a3d732e4c90cf6b05cb465d2e1 /fftools
parente3833e8a24b8498745b4b985a4df188b8d16b65a (diff)
ffmpeg: deprecate passing numbers to -vsync
There is never a reason to do this, using symbolic names is always preferred.
Diffstat (limited to 'fftools')
-rw-r--r--fftools/ffmpeg_opt.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index d478008866..42a65830a2 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1731,7 +1731,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
if ((frame_rate || max_frame_rate) &&
video_sync_method == VSYNC_PASSTHROUGH)
- av_log(NULL, AV_LOG_ERROR, "Using -vsync 0 and -r/-fpsmax can produce invalid output files\n");
+ av_log(NULL, AV_LOG_ERROR, "Using -vsync passthrough and -r/-fpsmax can produce invalid output files\n");
MATCH_PER_STREAM_OPT(frame_aspect_ratios, str, frame_aspect_ratio, oc, st);
if (frame_aspect_ratio) {
@@ -3191,8 +3191,11 @@ static int opt_vsync(void *optctx, const char *opt, const char *arg)
else if (!av_strcasecmp(arg, "passthrough")) video_sync_method = VSYNC_PASSTHROUGH;
else if (!av_strcasecmp(arg, "drop")) video_sync_method = VSYNC_DROP;
- if (video_sync_method == VSYNC_AUTO)
+ if (video_sync_method == VSYNC_AUTO) {
video_sync_method = parse_number_or_die("vsync", arg, OPT_INT, VSYNC_AUTO, VSYNC_VFR);
+ av_log(NULL, AV_LOG_WARNING, "Passing a number to -vsync is deprecated,"
+ " use a string argument as described in the manual.\n");
+ }
return 0;
}