[libav-devel] [PATCH 3/3] avconv: use vsync 0 for AVFMT_NOTIMESTAMPS formats.
Anton Khirnov
anton at khirnov.net
Mon Nov 21 08:19:31 CET 2011
Prevent avconv from duplicating or dropping frames for formats where it
makes even less sense than usual, e.g. image2.
---
avconv.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/avconv.c b/avconv.c
index c962b2b..cf4382f 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;
--
1.7.7
More information about the libav-devel
mailing list