[Mplayer-cvslog] CVS: main mplayer.c,1.323,1.324 cfg-mplayer.h,1.102,1.103
Anders Johansson
anders at mplayer.dev.hu
Sat Nov 24 06:29:58 CET 2001
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv15855
Modified Files:
mplayer.c cfg-mplayer.h
Log Message:
small change in mplayer.c and cfg-mplayer.h
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.323
retrieving revision 1.324
diff -u -r1.323 -r1.324
--- mplayer.c 21 Nov 2001 17:43:55 -0000 1.323
+++ mplayer.c 24 Nov 2001 05:29:56 -0000 1.324
@@ -1228,7 +1228,7 @@
unsigned int t;
int playsize;
- ao_pts=sh_audio->timer*90000.0;
+ ao_data.pts=sh_audio->timer*90000.0;
playsize=audio_out->get_space();
if(!playsize) break; // buffer is full, do not block here!!!
@@ -1324,10 +1324,10 @@
if(drop_frame){
if(sh_audio && !d_audio->eof){
- int delay=audio_out->get_delay();
- mp_dbg(MSGT_AVSYNC,MSGL_DBG2,"delay=%d\n",delay);
+ float delay=audio_out->get_delay();
+ mp_dbg(MSGT_AVSYNC,MSGL_DBG2,"delay=%f\n",delay);
time_frame=sh_video->timer;
- time_frame-=sh_audio->timer-(float)delay/(float)sh_audio->o_bps;
+ time_frame-=sh_audio->timer-delay;
if(time_frame>-2*frame_time) {
drop_frame=0; // stop dropping frames
mp_msg(MSGT_AVSYNC,MSGL_DBG2,"\nstop frame drop %.2f\n", time_frame);
@@ -1348,15 +1348,16 @@
time_frame-=GetRelativeTime(); // reset timer
if(sh_audio && !d_audio->eof){
- int delay=audio_out->get_delay();
- mp_dbg(MSGT_AVSYNC,MSGL_DBG2,"delay=%d\n",delay);
+ float delay=audio_out->get_delay();
+ mp_dbg(MSGT_AVSYNC,MSGL_DBG2,"delay=%f\n",delay);
if(!dapsync){
/* Arpi's AV-sync */
time_frame=sh_video->timer;
- time_frame-=sh_audio->timer-(float)delay/(float)sh_audio->o_bps;
+ time_frame-=sh_audio->timer-delay;
+
// we are out of time... drop next frame!
if(time_frame<-2*frame_time){
static int drop_message=0;
@@ -1508,8 +1509,7 @@
float v_pts=0;
// unplayed bytes in our and soundcard/dma buffer:
- int delay_bytes=audio_out->get_delay()+sh_audio->a_buffer_len;
- float delay=(float)delay_bytes/(float)sh_audio->o_bps;
+ float delay=audio_out->get_delay()+(float)sh_audio->a_buffer_len/(float)sh_audio->o_bps;
if(pts_from_bps){
#if 1
Index: cfg-mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- cfg-mplayer.h 14 Nov 2001 00:26:28 -0000 1.102
+++ cfg-mplayer.h 24 Nov 2001 05:29:56 -0000 1.103
@@ -137,7 +137,7 @@
{"loop", &loop_times, CONF_TYPE_INT, CONF_RANGE, -1, 10000},
{"sound", &has_audio, CONF_TYPE_FLAG, 0, 0, 1},
{"nosound", &has_audio, CONF_TYPE_FLAG, 0, 1, 0},
- {"abs", &ao_buffersize, CONF_TYPE_INT, CONF_MIN, 0, 0},
+ {"abs", &ao_data.buffersize, CONF_TYPE_INT, CONF_MIN, 0, 0},
{"delay", &audio_delay, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0},
{"alsa", "Option -alsa has been removed, new audio code doesn't need it! Remove it from your config file!\n",
More information about the MPlayer-cvslog
mailing list