On Sun, Sep 20, 2020 at 10:52:52AM +0200, Marton Balint wrote:
> Signed-off-by: Marton Balint <c...@passwd.hu>
> ---
>  libavformat/aviobuf.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

The commit message is too terse. It is not clear from it what the problem
is that is being fixed and how it is fixed.
Also this feels like it fixes multiple issues so it probably should be spit
unless iam missing some interdependancies

ill also take a look at the "competing" patch, so i dont yet know
how they relate ...


> 
> diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
> index 9675425349..aa1d6c0830 100644
> --- a/libavformat/aviobuf.c
> +++ b/libavformat/aviobuf.c
> @@ -999,9 +999,12 @@ int ffio_ensure_seekback(AVIOContext *s, int64_t 
> buf_size)
>      int filled = s->buf_end - s->buffer;
>      ptrdiff_t checksum_ptr_offset = s->checksum_ptr ? s->checksum_ptr - 
> s->buffer : -1;
>  
> -    buf_size += s->buf_ptr - s->buffer + max_buffer_size;
> +    if (buf_size <= s->buf_end - s->buf_ptr)
> +        return 0;
> +
> +    buf_size += s->buf_ptr - s->buffer + max_buffer_size - 1;
>  

> -    if (buf_size < filled || s->seekable || !s->read_packet)
> +    if (buf_size <= s->buffer_size || s->seekable || !s->read_packet)
>          return 0;

Did you check that this doesnt interfere with the s->buffer_size reduction
we do when it was larger from probing ?
Its maybe ok, just checking that this was considered

thx


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to