# HG changeset patch # User albeu # Date 1048796870 0 # Node ID 53e738a54064d824a3cbbfc532daf4f261bc4f18 # Parent 8ae20fe919c9ac4f280c1456601a3dc166ef034c Fix a 100L bug wich killed mencoder timing and switch to the new config header diff -r 8ae20fe919c9 -r 53e738a54064 libmpdemux/demux_rawaudio.c --- a/libmpdemux/demux_rawaudio.c Thu Mar 27 20:25:32 2003 +0000 +++ b/libmpdemux/demux_rawaudio.c Thu Mar 27 20:27:50 2003 +0000 @@ -6,7 +6,8 @@ #include #include -#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)); }