1
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:
wm4 2014-06-20 19:24:42 +02:00
parent 05fd3e701b
commit e41755553b

View File

@ -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);