mirror of https://git.ffmpeg.org/ffmpeg.git
Revert "aviobuf: Discard old buffered, previously read data in ffio_read_partial"
This is unneeded after2ca48e4666
and it breaks ffio_ensure_seekback(). This reverts commit53c25ee073
. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
fb0304fcc9
commit
f076a5fef6
|
@ -719,13 +719,6 @@ int avio_read_partial(AVIOContext *s, unsigned char *buf, int size)
|
||||||
|
|
||||||
len = s->buf_end - s->buf_ptr;
|
len = s->buf_end - s->buf_ptr;
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
/* Reset the buf_end pointer to the start of the buffer, to make sure
|
|
||||||
* the fill_buffer call tries to read as much data as fits into the
|
|
||||||
* full buffer, instead of just what space is left after buf_end.
|
|
||||||
* This avoids returning partial packets at the end of the buffer,
|
|
||||||
* for packet based inputs.
|
|
||||||
*/
|
|
||||||
s->buf_end = s->buf_ptr = s->buffer;
|
|
||||||
fill_buffer(s);
|
fill_buffer(s);
|
||||||
len = s->buf_end - s->buf_ptr;
|
len = s->buf_end - s->buf_ptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue