path: root/demux/cue.h
diff options
authorwm4 <wm4@nowhere>2018-01-05 17:38:09 +0100
committerKevin Mitchell <>2018-01-05 18:34:29 -0800
commit1eec7d231577a2101ef82227797e3a5b6d221428 (patch)
tree16bbd53bb46201f0fbcd9542051a86f0b951c0d8 /demux/cue.h
parent8e1390e73433cede480c85828518fedada700d59 (diff)
demux: include EOF state in cached seekable range
This means if the user tries to seek past EOF, and we know EOF was seen already, then use a cached seek, instead of triggering a low level seek. This requires some annoying tracking, but seems pretty simple otherwise. One advantage of doing this is that if the user tries to do this kind of seek, there's no unnecessary waiting for a reaction by network (and in most cases, redundant downloading of data just to discard it again). Another is that this avoids creating overlapping seek ranges: previously, the low level seek would naturally create a new range. Then it would read and add data from the end of the stream due to the low level demuxer not being able to seek to the target and selecting the last seek point before the end of the stream. Consequently, this new range would overlap with the previous cached range. But since the cache joining code is written such that you join the current range with the _next_ range (instead of the previous as it would be needed in this case), the overlapping ranges were left alone, until seeking back to the previous range. That was ugly, sort of harmless, and could happen in other cases, but this avoidable case was pretty easy to trigger.
Diffstat (limited to 'demux/cue.h')
0 files changed, 0 insertions, 0 deletions