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

Michael Niedermayer michaelni
Fri Apr 4 19:51:26 CEST 2008


On Fri, Apr 04, 2008 at 05:38:54PM +0200, Vitor Sessak wrote:
> 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?

segfault is one thing, writing to random places of memory another

and patch looks ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I wish the Xiph folks would stop pretending they've got something they
do not.  Somehow I fear this will remain a wish. -- M?ns Rullg?rd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080404/c127efde/attachment.pgp>



More information about the ffmpeg-devel mailing list