[FFmpeg-devel] [PATCH 02/10] avformat/nutenc: Reuse dynamic buffers when possible

Michael Niedermayer michael at niedermayer.cc
Tue May 5 16:43:51 EEST 2020


On Mon, May 04, 2020 at 08:22:42PM +0200, Andreas Rheinhardt wrote:
> NUT uses variable-length integers in order to for length fields.
> Therefore the NUT muxer often writes data into a dynamic buffer in order
> to get the length of it, then writes the length field using the fewest
> amount of bytes needed. To do this, a new dynamic buffer was opened,
> used and freed for each element which involves lots of allocations. This
> commit changes this: The dynamic buffers are now resetted and reused.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  libavformat/nutenc.c | 24 ++++++++----------------
>  1 file changed, 8 insertions(+), 16 deletions(-)

probably ok

thx

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

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200505/b600b7eb/attachment.sig>


More information about the ffmpeg-devel mailing list