Compare the correct clocks for syncing video to audio/ext.

Fixes initial delay on video from issue1134.

Originally committed as revision 21618 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2010-02-02 23:22:35 +00:00
parent 36cbdc9539
commit f04c6e35d4
1 changed files with 1 additions and 2 deletions

View File

@ -1026,8 +1026,7 @@ static double compute_frame_delay(double frame_current_pts, VideoState *is)
is->av_sync_type == AV_SYNC_EXTERNAL_CLOCK)) { is->av_sync_type == AV_SYNC_EXTERNAL_CLOCK)) {
/* if video is slave, we try to correct big delays by /* if video is slave, we try to correct big delays by
duplicating or deleting a frame */ duplicating or deleting a frame */
ref_clock = get_master_clock(is); diff = get_video_clock(is) - get_master_clock(is);
diff = frame_current_pts - ref_clock;
/* skip or repeat frame. We take into account the /* skip or repeat frame. We take into account the
delay to compute the threshold. I still don't know delay to compute the threshold. I still don't know