[FFmpeg-devel] [PATCH 1/4] lavu: add simple array implementation

Nicolas George george at nsup.org
Tue Mar 4 23:24:50 CET 2014


Le quartidi 14 ventôse, an CCXXII, Lukasz Marek a écrit :
> >From 6cdb1cb4b846478c8d7bc3c44e9e5d474aca52e0 Mon Sep 17 00:00:00 2001
> From: Lukasz Marek <lukasz.m.luki at gmail.com>
> Date: Tue, 25 Feb 2014 01:06:06 +0100
> Subject: [PATCH 1/4] lavu/mem: add av_dynarray_add_nofree function
> 
> av_dynarray_add_nofree function have similar functionality
> as existing av_dynarray_add, but it doesn't deallocate memory
> on fails.

I am sorry, but I still do not like it very much. It fixes one of the flaws
of av_dynarray_add(), but there are still others: you can not choose the
element size (this is only in the 2 variant; this version is even worse: it
assumes that sizeof(void *) == sizeof(intptr_t)), you can not choose the
type for the size variable (at some places, it is convenient to be able to
use size_t).

I still think that a macro is a better solution.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140304/b7dea5ca/attachment.asc>


More information about the ffmpeg-devel mailing list