[Mplayer-cvslog] CVS: main/libmpdemux demux_rawaudio.c,1.5,1.6

Alban Bedel CVS albeu at mplayerhq.hu
Thu Mar 27 21:27:53 CET 2003


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv29978/libmpdemux

Modified Files:
	demux_rawaudio.c 
Log Message:
Fix a 100L bug wich killed mencoder timing and switch to the new
config header


Index: demux_rawaudio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_rawaudio.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- demux_rawaudio.c	22 Dec 2002 17:22:48 -0000	1.5
+++ demux_rawaudio.c	27 Mar 2003 20:27:50 -0000	1.6
@@ -6,7 +6,8 @@
 #include <unistd.h>
 #include <string.h>
 
-#include "../cfgparser.h"
+#include "../m_option.h"
+#include "../m_config.h"
 
 #include "stream.h"
 #include "demuxer.h"
@@ -65,8 +66,8 @@
     return 0;
 
   dp = new_demux_packet(l);
-  ds->pts = spos / (float)(sh_audio->wf->nAvgBytesPerSec);
-  ds->pos = spos;
+  dp->pts = (spos - demuxer->movi_start)  / (float)(sh_audio->wf->nAvgBytesPerSec);
+  dp->pos = (spos - demuxer->movi_start);
 
   stream_read(demuxer->stream,dp->buffer,l);
   ds_add_packet(ds,dp);
@@ -87,7 +88,7 @@
 
   pos -= (pos % (sh_audio->channels * sh_audio->samplesize) );
   stream_seek(s,pos);
-  sh_audio->delay=pos / (float)(sh_audio->wf->nAvgBytesPerSec);
+  //sh_audio->delay=pos / (float)(sh_audio->wf->nAvgBytesPerSec);
   resync_audio_stream(sh_audio);
 //  printf("demux_rawaudio: streamtell=%d\n",(int)stream_tell(demuxer->stream));
 }



More information about the MPlayer-cvslog mailing list