[Mplayer-cvslog] CVS: main/libmpdemux demux_audio.c,1.6,1.7

Alban Bedel CVS albeu at mplayerhq.hu
Tue Apr 23 15:27:48 CEST 2002


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

Modified Files:
	demux_audio.c 
Log Message:
Fix % seeking


Index: demux_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- demux_audio.c	20 Feb 2002 16:55:11 -0000	1.6
+++ demux_audio.c	23 Apr 2002 13:27:46 -0000	1.7
@@ -288,10 +288,11 @@
     return;
   }
 
-  base = flags&1 ? demuxer->movi_start : stream_tell(s) ;
-  len = (demuxer->movi_end && flags&2) ? (demuxer->movi_end - demuxer->movi_start)*rel_seek_secs : rel_seek_secs;
-
-  pos = base+(len*sh_audio->i_bps);
+  base = flags&1 ? demuxer->movi_start : stream_tell(s);
+  if(flags&2)
+    pos = base + ((demuxer->movi_end - demuxer->movi_start)*rel_seek_secs);
+  else
+    pos = base + (rel_seek_secs*sh_audio->i_bps);
 
   if(demuxer->movi_end && pos >= demuxer->movi_end) {
     sh_audio->timer = (stream_tell(s) - demuxer->movi_start)/(float)sh_audio->i_bps;




More information about the MPlayer-cvslog mailing list