[FFmpeg-devel] [PATCH] lavu/mem: add av_dynarray2_add()

Stefano Sabatini stefasab at gmail.com
Mon May 13 13:02:01 CEST 2013


On date Saturday 2013-05-11 14:31:53 +0200, Stefano Sabatini encoded:
> On date Friday 2013-05-10 18:39:07 +0200, Clément Bœsch encoded:
> > On Fri, May 10, 2013 at 06:30:14PM +0200, Stefano Sabatini wrote:
> > > On date Friday 2013-05-10 18:16:59 +0200, Clément Bœsch encoded:
> > > > On Fri, May 10, 2013 at 10:26:13AM +0200, Stefano Sabatini wrote:
> > > > [...]
> > > > > Updated. If someone has an idea about a better name
> > > > > (av_dynarray_alloc_elem() doesn't match very well with
> > > > > av_dynarray_add()), please tell.
> > > > > 
> > > > 
> > > > Well, they don't work on the same type of array, they are in a sense
> > > > "incompatible", so I think the names are even too close.
> > > 
> > > What about:
> > > void *av_dynbuf_add(void **tab_ptr, int *nb_ptr, char *buf, size_t buf_size)
> > > 
> > > which prepends the content of buf to the dynamic buffer, or extends
> > > the size in case buf is NULL.
> > > 
> > 
> > Note that we have dyn_buf things in avio API, might be a little
> > "confusing".
> > 
> > > This should be even handier for my specific use case. Consider the
> > > patch suspended for the moment since I need to experiment a bit with
> > > it.
> > 
> > I think the current code has various useful use-cases (see following
> > patches in the thread).
> 
> Indeed, and I doubt of the utility of my dynbuf_add API, so I'll push
> av_dynarray_alloc_elem() as is.

New patch, new name and new interface which should be more flexible
and possibly less confusing.
-- 
FFmpeg = Foolish and Fostering Minimal Pacific Eretic Geisha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lavu-mem-add-av_dynarray2_add.patch
Type: text/x-diff
Size: 4235 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130513/38abc355/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-tools-ffeval-use-av_dynarray2_add.patch
Type: text/x-diff
Size: 2693 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130513/38abc355/attachment-0001.bin>


More information about the ffmpeg-devel mailing list