[FFmpeg-devel] [PATCH] [2/??] [3/3] Filter graphs - Parser for a graph description

Vitor Sessak vitor1001
Fri Apr 4 17:38:54 CEST 2008


Hi

Michael Niedermayer wrote:
> On Thu, Apr 03, 2008 at 10:13:33PM +0200, Vitor Sessak wrote:
>> Hi
>>
>> Michael Niedermayer wrote:
>>> On Thu, Apr 03, 2008 at 06:54:29PM +0200, Vitor Sessak wrote:
>>>> Hi, and thanks for the review
>>> [...]
>>>> (... review skipped ...)
>>>>
>>>> All good points. New version attached.
>>> [...]
>>>> void avfilter_graph_add_filter(AVFilterGraph *graph, AVFilterContext 
>>>> *filter)
>>>> {
>>>>     graph->filters = av_realloc(graph->filters,
>>>>                                 sizeof(AVFilterContext*) * 
>>>> ++graph->filter_count);
>>>>     graph->filters[graph->filter_count - 1] = filter;
>>> Out of array write
>> Could you elaborate? I'd agree if it were graph->filter_count++ and not 
>> ++graph->filter_count...
> 
> av_realloc() can return NULL ...

Fixed. Now avfilter_graph_add_filter() returns -1 on error.

A little offtopic question: did anyone ever tested how ffmpeg behaves 
when out of memory? Something like creating a virtual machine with 800kb 
of RAM and seeing if make test fails gracefully or segfault. Or is it 
useless even for embedded systems?

-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avfiltergraph.c
Type: text/x-csrc
Size: 4871 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080404/76a0b784/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avfiltergraph.h
Type: text/x-chdr
Size: 1624 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080404/76a0b784/attachment.h>



More information about the ffmpeg-devel mailing list