From bbeb54d80aa6d1d6945ce3b6461b7d24c57841e9 Mon Sep 17 00:00:00 2001 From: arpi Date: Sat, 14 Dec 2002 17:12:40 +0000 Subject: notice vo driver about skipped/dropped frames patch by Alvaro Lopes git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8451 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 1b64639104..ba43f759b7 100644 --- a/mplayer.c +++ b/mplayer.c @@ -1725,7 +1725,8 @@ if(time_frame>0.001 && !(vo_flags&256)){ if(vo_config_count) video_out->check_events(); current_module="flip_page"; - if(blit_frame && !frame_time_remaining){ + if (!frame_time_remaining) { + if(blit_frame){ unsigned int t2=GetTimer(); double tt; float j; @@ -1744,8 +1745,15 @@ if(time_frame>0.001 && !(vo_flags&256)){ t2=GetTimer()-t2; tt = t2*0.000001f; vout_time_usage+=tt; - } - + } else { + /* + Well, no blitting is needed, but some devices (such as yuv4mpeg) must output frame + otherwise A/V desync will occur. -- Alvieboy + */ + if (vo_config_count) + video_out->control(VOCTRL_DUPLICATE_FRAME, NULL); + } + } //====================== A-V TIMESTAMP CORRECTION: ========================= current_module="av_sync"; -- cgit v1.2.3