diff --git a/video.c b/video.c index 981f5c8..fba9dd5 100644 --- a/video.c +++ b/video.c @@ -4600,7 +4600,7 @@ static void VaapiSyncDecoder(VaapiDecoder * decoder) goto out; } // both clocks are known - if (audio_clock + VideoAudioDelay <= video_clock + 15 * 90) { + if (audio_clock + VideoAudioDelay <= video_clock + 35 * 90) { goto out; } // out of sync: audio before video @@ -4644,12 +4644,12 @@ static void VaapiSyncDecoder(VaapiDecoder * decoder) ++decoder->FramesDuped; decoder->SyncCounter = 1; goto out; - } else if (video_clock > audio_clock + VideoAudioDelay + 45 * 90) { + } else if (video_clock > audio_clock + VideoAudioDelay + 65 * 90) { err = VaapiMessage(3, "video: slow down video, duping frame\n"); ++decoder->FramesDuped; decoder->SyncCounter = 1; goto out; - } else if (audio_clock + VideoAudioDelay > video_clock + 15 * 90 + } else if (audio_clock + VideoAudioDelay > video_clock + 35 * 90 && filled > 1 + 2 * decoder->Interlaced) { err = VaapiMessage(3, "video: speed up video, droping frame\n"); ++decoder->FramesDropped; @@ -8009,7 +8009,7 @@ static void VdpauSyncDecoder(VdpauDecoder * decoder) goto out; } // both clocks are known - if (audio_clock + VideoAudioDelay <= video_clock + 15 * 90) { + if (audio_clock + VideoAudioDelay <= video_clock + 35 * 90) { goto out; } // out of sync: audio before video @@ -8052,12 +8052,12 @@ static void VdpauSyncDecoder(VdpauDecoder * decoder) ++decoder->FramesDuped; decoder->SyncCounter = 1; goto out; - } else if (video_clock > audio_clock + VideoAudioDelay + 45 * 90) { + } else if (video_clock > audio_clock + VideoAudioDelay + 65 * 90) { err = VdpauMessage(2, "video: slow down video, duping frame\n"); ++decoder->FramesDuped; decoder->SyncCounter = 1; goto out; - } else if (audio_clock + VideoAudioDelay > video_clock + 15 * 90 + } else if (audio_clock + VideoAudioDelay > video_clock + 35 * 90 && filled > 1 + 2 * decoder->Interlaced) { err = VdpauMessage(2, "video: speed up video, droping frame\n"); ++decoder->FramesDropped;