[FFmpeg-devel] [PATCH]Print an error if both -r and -vsync 0 are used

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Oct 20 10:00:11 CEST 2014


Hi!

I don't think these options are meant to be used together.
Related to ticket #4041.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index c518ae1..00eee9f 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -1276,6 +1276,8 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
         av_log(NULL, AV_LOG_FATAL, "Invalid framerate value: %s\n", frame_rate);
         exit_program(1);
     }
+    if (frame_rate && video_sync_method == VSYNC_PASSTHROUGH)
+        av_log(NULL, AV_LOG_ERROR, "Using -vsync 0 and -r produces invalid output files\n");
 
     MATCH_PER_STREAM_OPT(frame_aspect_ratios, str, frame_aspect_ratio, oc, st);
     if (frame_aspect_ratio) {


More information about the ffmpeg-devel mailing list