diff mbox series

[FFmpeg-devel] Revert "aviobuf: Discard old buffered, previously read data in ffio_read_partial"

Message ID 20201008224422.7685-1-cus@passwd.hu
State Accepted
Commit f076a5fef63d431107a9431cd4b1b82aea164f67
Headers show
Series [FFmpeg-devel] Revert "aviobuf: Discard old buffered, previously read data in ffio_read_partial" | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Marton Balint Oct. 8, 2020, 10:44 p.m. UTC
This is unneeded after 2ca48e466675a8a3630061cd2c15325eab8eda97 and it breaks
ffio_ensure_seekback().

This reverts commit 53c25ee0736497b46bb76064cc2c84c976b2d295.
---
 libavformat/aviobuf.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Marton Balint Oct. 15, 2020, 7:41 p.m. UTC | #1
On Fri, 9 Oct 2020, Marton Balint wrote:

> This is unneeded after 2ca48e466675a8a3630061cd2c15325eab8eda97 and it breaks
> ffio_ensure_seekback().
>
> This reverts commit 53c25ee0736497b46bb76064cc2c84c976b2d295.
> ---
> libavformat/aviobuf.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
> index a77517d712..b55b206be2 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;
>     }

Ping, will apply soon.

Thanks,
Marton
Marton Balint Oct. 16, 2020, 9:21 p.m. UTC | #2
On Thu, 15 Oct 2020, Marton Balint wrote:

>
>
> On Fri, 9 Oct 2020, Marton Balint wrote:
>
>> This is unneeded after 2ca48e466675a8a3630061cd2c15325eab8eda97 and it 
> breaks
>> ffio_ensure_seekback().
>>
>> This reverts commit 53c25ee0736497b46bb76064cc2c84c976b2d295.
>> ---
>> libavformat/aviobuf.c | 7 -------
>> 1 file changed, 7 deletions(-)
>>
>> diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
>> index a77517d712..b55b206be2 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;
>>     }
>
> Ping, will apply soon.

Applied.

Regards,
Marton
diff mbox series

Patch

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index a77517d712..b55b206be2 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;
     }