From 9a6313ed24efaeb22b86ddc6309ee28e3bbde0e4 Mon Sep 17 00:00:00 2001 From: uau Date: Wed, 20 Jun 2007 18:19:03 +0000 Subject: demux_mkv very long seek fix The seek code searching for the closest position in the index used "int64_t min_diff=0xFFFFFFFL" as the initial "further from the goal than any real alternative" value. The unit is milliseconds so seeks more than about 75 hours past the end of the file would fail to recognize the last index position as the best match. This was triggered in practice by chapter seek code which apparently uses a seek of 1000000000 seconds forward to mean "seek to the end". The practical effect was that trying to seek to the next chapter in a file without chapters made MPlayer block until it finished reading the file from the current position to the end. Fixed by increasing the initial value from FFFFFFF to FFFFFFFFFFFFFFF. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23592 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_mkv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmpdemux/demux_mkv.c') diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index a37cfa6583..684158ca53 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -3394,7 +3394,7 @@ demux_mkv_seek (demuxer_t *demuxer, float rel_seek_secs, float audio_delay, int { mkv_demuxer_t *mkv_d = (mkv_demuxer_t *) demuxer->priv; stream_t *s = demuxer->stream; - int64_t target_timecode = 0, diff, min_diff=0xFFFFFFFL; + int64_t target_timecode = 0, diff, min_diff=0xFFFFFFFFFFFFFFFLL; int i; if (!(flags & 1)) /* relative seek */ -- cgit v1.2.3