[MPlayer-users] Re: matroska seeking problem

matthieu mat100 at ifrance.com
Fri Sep 12 23:02:54 CEST 2003


And this one quicker...
Sorry for the 2 last post

Matthieu


Index: libmpdemux/demux_mkv.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mkv.cpp,v
retrieving revision 1.30
diff -u -r1.30 demux_mkv.cpp
--- libmpdemux/demux_mkv.cpp    10 Sep 2003 12:50:29 -0000      1.30
+++ libmpdemux/demux_mkv.cpp    12 Sep 2003 21:31:36 -0000
@@ -2416,9 +2416,9 @@
            if (!index->entries[k].is_key)
              continue;
            diff = target_timecode - (int64_t)index->entries[k].timecode;
-          if (diff < 0)
-            diff *= -1;
-          if (diff < min_diff) {
+          if (diff < min_diff && diff > 0) {
              min_diff = diff;
              entry = & index->entries[k];
            }


matthieu wrote:
> this should be better...
> 
> Index: libmpdemux/demux_mkv.cpp
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mkv.cpp,v
> retrieving revision 1.30
> diff -u -r1.30 demux_mkv.cpp
> --- libmpdemux/demux_mkv.cpp    10 Sep 2003 12:50:29 -0000      1.30
> +++ libmpdemux/demux_mkv.cpp    12 Sep 2003 21:22:29 -0000
> @@ -2416,9 +2416,9 @@
>            if (!index->entries[k].is_key)
>              continue;
>            diff = target_timecode - (int64_t)index->entries[k].timecode;
> -          if (diff < 0)
> -            diff *= -1;
> -          if (diff < min_diff) {
> +//          if (diff < 0)
> +//           diff *= -1;
> +          if (diff > 0 && diff < min_diff) {
>              min_diff = diff;
>              entry = & index->entries[k];
>            }
> 
> Mathhieu
> 
> 



More information about the MPlayer-users mailing list