diff options
author | wm4 <wm4@nowhere> | 2014-04-09 23:11:57 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-09 23:12:31 +0200 |
commit | 24f1878e95020b8cb62a6f17301b1ec2209fa109 (patch) | |
tree | b227e4596c0e752dfd841169a4fcf43d98809a7e /stream/cache.c | |
parent | d6086fa9ece0342a0a94be3b133ee68b55eee833 (diff) | |
download | mpv-24f1878e95020b8cb62a6f17301b1ec2209fa109.tar.bz2 mpv-24f1878e95020b8cb62a6f17301b1ec2209fa109.tar.xz |
stream_dvd, cache: hack seeking with --cache + dvd:// back into working
This was broken at some unknown point (even before the recent cache
changes). There are several problems:
- stream_dvd returning a random stream position, confusing the cache
layer (cached data and stream data lost their 1:1 corrospondence by
position)
- this also confused the mechanism added with commit a9671524, which
basically triggered random seeking (although this was not the only
problem)
- demux_lavf requesting seeks in the stream layer, which resulted in
seeks in the cache or the real stream
Fix this by completely removing byte-based seeking from stream_dvd. This
already works fine for stream_dvdnav and stream_bluray. Now all these
streams do time-based seeks, and pretend to be infinite streams of data,
and the rest of the player simply doesn't care about the stream byte
positions.
Diffstat (limited to 'stream/cache.c')
-rw-r--r-- | stream/cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/cache.c b/stream/cache.c index 6f52609082..a377d4c96a 100644 --- a/stream/cache.c +++ b/stream/cache.c @@ -233,7 +233,7 @@ static bool cache_fill(struct priv *s) cache_drop_contents(s); } - if (stream_tell(s->stream) != s->max_filepos) { + if (stream_tell(s->stream) != s->max_filepos && s->seekable) { MP_VERBOSE(s, "Seeking underlying stream: %"PRId64" -> %"PRId64"\n", stream_tell(s->stream), s->max_filepos); stream_seek(s->stream, s->max_filepos); |