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

Vitor Sessak vitor1001
Thu Apr 3 22:13:33 CEST 2008


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...

> 
> 
> [...]
>> static int query_formats(AVFilterGraph *graph)
>> {
>>     int i, j;
>>     int scaler_count = 0;
>>     char inst_name[30];
> [...]
>>                     /* couldn't merge format lists. auto-insert scale filter */
>>                     snprintf(inst_name, 30, "auto-inserted scaler %d",
>>                              scaler_count);
> 
> sizeof(inst_name)

Its better indeed. New version attached.

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



More information about the ffmpeg-devel mailing list