]> git.sesse.net Git - ffmpeg/commitdiff
Revert "aviobuf: Discard old buffered, previously read data in ffio_read_partial"
authorMarton Balint <cus@passwd.hu>
Thu, 8 Oct 2020 22:18:07 +0000 (00:18 +0200)
committerMarton Balint <cus@passwd.hu>
Fri, 16 Oct 2020 21:16:46 +0000 (23:16 +0200)
This is unneeded after 2ca48e466675a8a3630061cd2c15325eab8eda97 and it breaks
ffio_ensure_seekback().

This reverts commit 53c25ee0736497b46bb76064cc2c84c976b2d295.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavformat/aviobuf.c

index 15d91f91bc717c15aae30ad805dc0c45fedcccf7..80a5a565a4623a9a4a877eabfa5138dd465f25e1 100644 (file)
@@ -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;
     }