[FFmpeg-devel] [PATCH 1/5] lavu: add av_dynarray_alloc_elem().

Stefano Sabatini stefasab at gmail.com
Sat May 11 14:31:53 CEST 2013


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.
-- 
FFmpeg = Fiendish and Furious Martial Political Efficient Gymnast


More information about the ffmpeg-devel mailing list