[MPlayer-cvslog] CVS: main/libmpdemux demux_audio.c,1.39,1.40

Reimar Döffinger CVS syncmail at mplayerhq.hu
Thu Oct 20 17:15:55 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv32098

Modified Files:
	demux_audio.c 
Log Message:
Fix seeking in wav files: align relative to start of data, not start of file
and use nBlockAlign if available.


Index: demux_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- demux_audio.c	9 Sep 2005 20:05:42 -0000	1.39
+++ demux_audio.c	20 Oct 2005 15:15:53 -0000	1.40
@@ -518,7 +518,9 @@
   
   switch(priv->frmt) {
   case WAV:
-    pos -= (pos % (sh_audio->channels * sh_audio->samplesize) );
+    pos -= (pos - demuxer->movi_start) %
+            (sh_audio->wf->nBlockAlign ? sh_audio->wf->nBlockAlign :
+             (sh_audio->channels * sh_audio->samplesize));
     // We need to decrease the pts by one step to make it the "last one"
     priv->last_pts -= sh_audio->wf->nAvgBytesPerSec/(float)sh_audio->i_bps;
     break;




More information about the MPlayer-cvslog mailing list