mirror of
https://github.com/mpv-player/mpv
synced 2024-10-22 08:51:57 +02:00
stream_dvd: fix potential endless loop on seeking
Attempt to fix a reported freeze with some DVDs. Unknown if this helps, and it still might read the whole DVD before terminating.
This commit is contained in:
parent
05fd3e701b
commit
e41755553b
@ -484,7 +484,8 @@ static int dvd_seek_to_time(stream_t *stream, ifo_handle_t *vts_file, double sec
|
||||
do_seek(stream, pos);
|
||||
do {
|
||||
char buf[2048];
|
||||
dvd_read_sector(stream, stream->priv, buf); // skip
|
||||
if (dvd_read_sector(stream, stream->priv, buf) < 0) // skip
|
||||
break;
|
||||
t = mp_dvdtimetomsec(&d->dsi_pack.dsi_gi.c_eltm);
|
||||
} while(!t);
|
||||
tm = dvd_get_current_time(stream, -1);
|
||||
|
Loading…
Reference in New Issue
Block a user