summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2020-10-09 00:18:07 +0200
committerMarton Balint <cus@passwd.hu>2020-10-16 23:16:46 +0200
commitf076a5fef63d431107a9431cd4b1b82aea164f67 (patch)
tree4d27bd7a5e2f6a5fcb5e1e2ec3693a74d33436a8 /libavformat/aviobuf.c
parentfb0304fcc9f79a4c9cbdf347f20f484529f169ba (diff)
Revert "aviobuf: Discard old buffered, previously read data in ffio_read_partial"
This is unneeded after 2ca48e466675a8a3630061cd2c15325eab8eda97 and it breaks ffio_ensure_seekback(). This reverts commit 53c25ee0736497b46bb76064cc2c84c976b2d295. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 15d91f91bc..80a5a565a4 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -719,13 +719,6 @@ int avio_read_partial(AVIOContext *s, unsigned char *buf, int size)
len = s->buf_end - s->buf_ptr;
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);
len = s->buf_end - s->buf_ptr;
}