[FFmpeg-cvslog] avconv: use vsync 0 for AVFMT_NOTIMESTAMPS formats.

Anton Khirnov git at videolan.org
Thu Nov 24 03:38:32 CET 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Nov 20 12:46:24 2011 +0100| [e1edfbcb240cace69d92701e6910c2b03555b7d7] | committer: Anton Khirnov

avconv: use vsync 0 for AVFMT_NOTIMESTAMPS formats.

Prevent avconv from duplicating or dropping frames for formats where it
makes even less sense than usual, e.g. image2.

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

 avconv.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/avconv.c b/avconv.c
index a03c9c1..ff26bdd 100644
--- 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;



More information about the ffmpeg-cvslog mailing list