[FFmpeg-devel] [PATCH] libavutil/fifo: Fix fifo grow step

Michael Niedermayer michael at niedermayer.cc
Fri Jun 3 19:55:44 CEST 2016

On Fri, Jun 03, 2016 at 02:04:00PM +0200, sebechlebskyjan at gmail.com wrote:
> From: Jan Sebechlebsky <sebechlebskyjan at gmail.com>
> Fifo was reallocating always to twice of the requested size.
> This fixes it to reallocate to requested size, or twice of the
> original size - whichever is greater.
> Signed-off-by: Jan Sebechlebsky <sebechlebskyjan at gmail.com>
> ---
>  I believe the intended behaviour was as described in commit message
>  and FFMAX(size,2*size) is a mistake.

the point behind teh FFMAX was to protect against a overflow of
2*size but your suggestion is probably better and would reduce memory
use, so applied


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160603/64cf634f/attachment.sig>

More information about the ffmpeg-devel mailing list