diff options
author | wm4 <wm4@nowhere> | 2013-08-26 23:28:05 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-08-28 23:08:08 +0200 |
commit | 792844f8732b294b6badd8d80c29aa03cf6f3ca1 (patch) | |
tree | 2835215c90994aa8e8218f5112f38fd6b574cebf /mpvcore/m_property.h | |
parent | c181ae87ce43f148952a96d3dbadc3013dcbdf22 (diff) | |
download | mpv-792844f8732b294b6badd8d80c29aa03cf6f3ca1.tar.bz2 mpv-792844f8732b294b6badd8d80c29aa03cf6f3ca1.tar.xz |
stream: read at least a full buffer with stream_peek()
Until now, stream_peek() read only the bare minimum it had to read from
the stream. But this could cause problems, such as being very
inefficient when peeking a lot, or conflicting with ability to seek
back. (The latter issue can be caused by peeking a few bytes, and then
doing a stream_read() with a size that is 1 byte longer: this would read
the peeked data, then call stream_fill_buffer(), which throws away the
previously peeked bytes - so you can't seek back anymore. This is
mitigated by a hack in demux_open(): it peeks a full buffer, to avoid
that peeking/reading during demuxer probing [or before that, in a stream
filter] can cause the buffer to be dropped.)
Diffstat (limited to 'mpvcore/m_property.h')
0 files changed, 0 insertions, 0 deletions