# HG changeset patch # User arpi # Date 1004928833 0 # Node ID 013e84f44cf512fb50f38e58d82300c20ee37e16 # Parent b4c6699d3893cd62742608737dea510c24375382 libvo driver may have its own timing diff -r b4c6699d3893 -r 013e84f44cf5 mplayer.c --- a/mplayer.c Mon Nov 05 02:25:30 2001 +0000 +++ b/mplayer.c Mon Nov 05 02:53:53 2001 +0000 @@ -398,6 +398,8 @@ int v_hue=50; int v_saturation=50; +int vo_flags=0; + //float a_frame=0; // Audio int i; @@ -899,16 +901,16 @@ mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s video codec: [%s] drv:%d (%s)\n",video_codec?"Forcing":"Detected",sh_video->codec->name,sh_video->codec->driver,sh_video->codec->info); for(i=0;icodec->outfmt[i]; if(out_fmt==0xFFFFFFFF) continue; #ifdef USE_LIBVO2 - ret=vo2_query_format(video_out); + vo_flags=vo2_query_format(video_out); #else - ret=video_out->query_format(out_fmt); + vo_flags=video_out->query_format(out_fmt); #endif - mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug: query(%s) returned 0x%X\n",vo_format_name(out_fmt),ret); - if(ret) break; + mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug: query(%s) returned 0x%X\n",vo_format_name(out_fmt),vo_flags); + if(vo_flags) break; } if(i>=CODECS_MAX_OUTFMT){ mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_VOincompCodec); @@ -1142,10 +1144,15 @@ if(play_n_frames<0) exit_player(MSGTR_Exit_frames); } + vo_pts=sh_video->timer*90000.0; + /*========================== PLAY AUDIO ============================*/ while(sh_audio){ unsigned int t; - int playsize=audio_out->get_space(); + int playsize; + + ao_pts=sh_audio->timer*90000.0; + playsize=audio_out->get_space(); if(!playsize) break; // buffer is full, do not block here!!! @@ -1294,7 +1301,8 @@ EventHandling(); } #endif - + +if(!(vo_flags&256)){ // flag 256 means: libvo driver does its timing (dvb card) while(time_frame>0.005){ if(time_frame<=0.020) // usec_sleep(10000); // sleeps 1 clock tick (10ms)! @@ -1308,6 +1316,7 @@ #endif time_frame-=GetRelativeTime(); } +} current_module="flip_page"; #ifdef USE_LIBVO2