]> git.sesse.net Git - ffmpeg/commitdiff
avconv: use vsync 0 for AVFMT_NOTIMESTAMPS formats.
authorAnton Khirnov <anton@khirnov.net>
Sun, 20 Nov 2011 11:46:24 +0000 (12:46 +0100)
committerAnton Khirnov <anton@khirnov.net>
Wed, 23 Nov 2011 20:38:17 +0000 (21:38 +0100)
Prevent avconv from duplicating or dropping frames for formats where it
makes even less sense than usual, e.g. image2.

avconv.c

index a03c9c1ba9d636175f00f830f3a850618153d0d1..ff26bdd0db27ae383cdcfe56c435599d8d47d1ff 100644 (file)
--- a/avconv.c
+++ b/avconv.c
@@ -1160,7 +1160,8 @@ static void do_video_out(AVFormatContext *s,
 
     format_video_sync = video_sync_method;
     if (format_video_sync < 0)
-        format_video_sync = (s->oformat->flags & AVFMT_VARIABLE_FPS) ? 2 : 1;
+        format_video_sync = (s->oformat->flags & AVFMT_NOTIMESTAMPS) ? 0 :
+                            (s->oformat->flags & AVFMT_VARIABLE_FPS) ? 2 : 1;
 
     if (format_video_sync) {
         double vdelta = sync_ipts - ost->sync_opts;