diff options
author | wm4 <wm4@nowhere> | 2013-11-03 19:21:47 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-03 19:21:47 +0100 |
commit | a49ab7cc2f9548edcfdd8ad9874050bd41e0b551 (patch) | |
tree | 31aaafcaaafd38c732155d0f71dde36842b5a210 /demux/demux_mkv.c | |
parent | 847cbe9d5d03c77491f3139dde6e163426283ccb (diff) | |
download | mpv-a49ab7cc2f9548edcfdd8ad9874050bd41e0b551.tar.bz2 mpv-a49ab7cc2f9548edcfdd8ad9874050bd41e0b551.tar.xz |
demux: make determining seek capability generic
Instead of having each demuxer do it (only demux_mkv actually did...),
let generic code determine whether the file is seekable. This requires
adding exceptions to demuxers where the stream is not seekable, but the
demuxer is.
Sort-of try to improve handling of unseekable files in the player. Exit
early if the file is determined to be unseekable, instead of resetting
all decoders and then performing a pointless seek.
Add an exception to allow seeking if the file is not seekable, but the
stream cache is enabled. Print a warning in this case, because seeking
outside the cache (which we can't prevent since the demuxer is not aware
of this problem) still messes everything up.
Diffstat (limited to 'demux/demux_mkv.c')
-rw-r--r-- | demux/demux_mkv.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index d6948e9979..4181aa4850 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -1844,12 +1844,6 @@ static int demux_mkv_open(demuxer_t *demuxer, enum demux_check check) display_create_tracks(demuxer); - if (s->end_pos == 0) { - demuxer->seekable = 0; - } else { - demuxer->seekable = 1; - } - return 0; } |