diff options
author | wm4 <wm4@nowhere> | 2014-10-08 00:58:21 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-08 00:58:21 +0200 |
commit | 8d905288262d04526d3c0348a07fa34c8ada6b96 (patch) | |
tree | 8ce6b187fd85169e8301715615d928eed2eda04a /sub/sd_lavf_srt.c | |
parent | 34571b3c2425ddaa9adf9e074c2bcb7147b4687e (diff) | |
download | mpv-8d905288262d04526d3c0348a07fa34c8ada6b96.tar.bz2 mpv-8d905288262d04526d3c0348a07fa34c8ada6b96.tar.xz |
stream: change internal instead of external pos when dropping buffers
stream provides a read buffer (so even something like stream_read_char()
is very fast). This means the stream reads ahead by a few KBs, and
implies that the internal position (s->pos, which would match e.g. the
file position in stream_file.c), and the external position
(stream_tell()) can be different. stream_tell() shows how these are
related.
When dropping buffers, which happens on byte-level discontinuities with
a bunch of streams (including DVB), we should not change the position as
seen by the demuxer. On the other hand, the internal position is not
really meaningful, since these streams aren't seekable anyway. So just
change the code such that stream_drop_buffers() doesn't change the
demuxer visible position.
I'm hoping that this will fix a few problems with DVB. (Also see
previous commit.)
Diffstat (limited to 'sub/sd_lavf_srt.c')
0 files changed, 0 insertions, 0 deletions