[MPlayer-dev-eng] [PATCH] Fix for -hr-mp3-seek bug

KOSSOVICS Balazs tevefeju at freemail.hu
Sun Sep 5 23:20:06 CEST 2004


Hi!

When we listening music with "-hr-mp3-seek" option, than there is a
negative value at the first rewinds in the statusrange (-52 hours, some 
minutes). The patch is against this.

-- 
Balazs KOSSOVICS 
-------------- next part --------------
Index: demux_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
retrieving revision 1.26
diff -u -r1.26 demux_audio.c
--- demux_audio.c	12 Aug 2004 12:36:08 -0000	1.26
+++ demux_audio.c	5 Sep 2004 21:06:11 -0000
@@ -371,8 +371,9 @@
     return;
   s = demuxer->stream;
   priv = demuxer->priv;
-
+  
   if(priv->frmt == MP3 && hr_mp3_seek && !(flags & 2)) {
+    if(isinf(priv->last_pts)) priv->last_pts=0;
     len = (flags & 1) ? rel_seek_secs - priv->last_pts : rel_seek_secs;
     if(len < 0) {
       stream_seek(s,demuxer->movi_start);


More information about the MPlayer-dev-eng mailing list