aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-13 16:19:23 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-13 16:19:23 +0000
commit8858816d4cd4ab88f3e34df811d877ef35e63f4e (patch)
treee08933fe8adcc5ea119d9f7728d5cb484c024d56 /ffmpeg.c
parentb9fa32082c71013e90eab9e9997967d2939cf4a6 (diff)
downloadffmpeg-8858816d4cd4ab88f3e34df811d877ef35e63f4e.tar.gz
Use -vsync 0 unless the user explicitly asked for something
else when the framerate is above 1000. Fixes issue259. Originally committed as revision 14208 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index fcd6dd40c1..48ce906ad4 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -173,7 +173,7 @@ static char *pass_logfilename = NULL;
static int audio_stream_copy = 0;
static int video_stream_copy = 0;
static int subtitle_stream_copy = 0;
-static int video_sync_method= 1;
+static int video_sync_method= -1;
static int audio_sync_method= 0;
static float audio_drift_threshold= 0.1;
static int copy_ts= 0;
@@ -797,7 +797,7 @@ static void do_video_out(AVFormatContext *s,
*frame_size = 0;
- if(video_sync_method){
+ if(video_sync_method>0 || (video_sync_method && av_q2d(enc->time_base) > 0.001)){
double vdelta;
vdelta = get_sync_ipts(ost) / av_q2d(enc->time_base) - ost->sync_opts;
//FIXME set to 0.5 after we fix some dts/pts bugs like in avidec.c