diff options
author | wm4 <wm4@nowhere> | 2014-06-20 19:24:42 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-20 19:26:04 +0200 |
commit | e41755553bc6973c54e0f77b8e60c0f1ffa149e4 (patch) | |
tree | 6f703a7e3a2db9059335a3b6b5e5cfa7fe6e9278 /stream | |
parent | 05fd3e701b50364dd032d3fff2b1a607e2c6f239 (diff) | |
download | mpv-e41755553bc6973c54e0f77b8e60c0f1ffa149e4.tar.bz2 mpv-e41755553bc6973c54e0f77b8e60c0f1ffa149e4.tar.xz |
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.
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream_dvd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index d67f14a5c1..a63cc41f75 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -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); |