changeset 13256:9a3e02d65e08

fix seeking with -hr-mp3-seek. maybe not the best fix (why is last_pts ever infinite?!?!) but at least it makes it work... :) patch by Balazs KOSSOVICS (tevefeju AT freemail.hu): 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.
author rfelker
date Sun, 05 Sep 2004 22:10:59 +0000
parents 3cc935e177d2
children 9e8b984a39a5
files libmpdemux/demux_audio.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_audio.c	Sun Sep 05 22:01:23 2004 +0000
+++ b/libmpdemux/demux_audio.c	Sun Sep 05 22:10:59 2004 +0000
@@ -373,6 +373,7 @@
   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);