[FFmpeg-devel] [PATCH] lavu/fifo: add av_fifo_alloc_array function

Lukasz Marek lukasz.m.luki2 at gmail.com
Tue May 20 00:06:23 CEST 2014


On 10.05.2014 19:17, James Almer wrote:
> On 10/05/14 3:15 AM, Lukasz Marek wrote:
>> TODO: minor bump and doc/APIchanges update
>>
>> Allows to alloc fifo buffer by passing
>> number of elements and size of element.
>>
>> Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>
>> ---
>>   libavutil/fifo.c | 27 +++++++++++++++++++++------
>>   libavutil/fifo.h |  8 ++++++++
>>   2 files changed, 29 insertions(+), 6 deletions(-)
>>
>> diff --git a/libavutil/fifo.c b/libavutil/fifo.c
>> index e35237c..5c82d09 100644
>> --- a/libavutil/fifo.c
>> +++ b/libavutil/fifo.c
>> @@ -24,19 +24,34 @@
>>   #include "common.h"
>>   #include "fifo.h"
>>
>> -AVFifoBuffer *av_fifo_alloc(unsigned int size)
>> +static AVFifoBuffer *av_fifo_alloc_common(void *buffer, size_t size)
>
> If it's static it shouldn't have the av_ prefix.
> Rename it to alloc_common() or similar before pushing.

Renamed, thx.

I have pushed into my repo

b9419b5 lavf/ftp: favour EPSV over PASV command
37fa4b9 lavf/audiointerleave: return more meaningful error codes
2ed9e17 lavf/audiointerleave: check for allocation failure
c61cdef lavf/audiointerleave: use av_fifo_alloc_array
74f9c59 lavf/dvenc: use av_fifo_alloc_array
8aa2988 lavc/flac_parser: use av_fifo_alloc_array
bc4f362 lavc/frame_thread_encoder: use av_fifo_alloc_array
ce051ce lavfi/vf_fps: use av_fifo_alloc_array
d15db8e lavfi/buffersink: use av_fifo_alloc_array
4d68667 ffmpeg: use av_fifo_alloc_array
51bad41 lavd/jack_audio: use av_fifo_alloc_array
7336e39 lavu/fifo: add av_fifo_alloc_array function

Following pushed with minor fixes:
b9419b5 lavf/ftp: favour EPSV over PASV command

Following have not been commented on mailing list, but they are trivial 
I think, so pushed:
d15db8e lavfi/buffersink: use av_fifo_alloc_array
51bad41 lavd/jack_audio: use av_fifo_alloc_array

Please merge when no remarks.


More information about the ffmpeg-devel mailing list