mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +00:00
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
This commit is contained in:
parent
4c1b6e248a
commit
9a6313ed24
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user