[FFmpeg-cvslog] ffmpeg: rewrite vsync / notimestamps handling
Michael Niedermayer
git at videolan.org
Thu Nov 24 05:55:46 CET 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Nov 24 04:57:38 2011 +0100| [957867ab139332d548c05d6a2f22ce0246b66359] | committer: Michael Niedermayer
ffmpeg: rewrite vsync / notimestamps handling
The qatar implementation makes no sense.
a muxer without timestamps is constant fps thus needs vsync.
the crc/mp5 are special cases that have timestamps yet allow any
nonsensical timestamps.
raw (yuv/rgb) video is constant fps thus needs vsync too.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=957867ab139332d548c05d6a2f22ce0246b66359
---
ffmpeg.c | 3 +--
tests/ref/lavf/gxf | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index f6a9765..577425b 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1246,8 +1246,7 @@ 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_NOTIMESTAMPS) ? 0 :
- (s->oformat->flags & AVFMT_VARIABLE_FPS) ? 2 : 1;
+ format_video_sync = (s->oformat->flags & AVFMT_VARIABLE_FPS) ? ((s->oformat->flags & AVFMT_NOTIMESTAMPS) ? 0 : 2) : 1;
if (format_video_sync) {
double vdelta = sync_ipts - ost->sync_opts + duration;
diff --git a/tests/ref/lavf/gxf b/tests/ref/lavf/gxf
index 6b39c2f..68bc978 100644
--- a/tests/ref/lavf/gxf
+++ b/tests/ref/lavf/gxf
@@ -1,3 +1,3 @@
346d38d330ab5cb0caa6b5537167bc0d *./tests/data/lavf/lavf.gxf
796392 ./tests/data/lavf/lavf.gxf
-./tests/data/lavf/lavf.gxf CRC=0x345f86eb
+./tests/data/lavf/lavf.gxf CRC=0x102918fd
More information about the ffmpeg-cvslog
mailing list