[FFmpeg-soc] [soc]: r417 - in libavfilter: avfilter.c avfilter.h filter_test.c

Michael Niedermayer michaelni at gmx.at
Sat Jul 14 21:35:24 CEST 2007


Hi

On Sat, Jul 14, 2007 at 09:33:28PM +0200, koorogi wrote:
> Author: koorogi
> Date: Sat Jul 14 21:33:28 2007
> New Revision: 417
> 
> Log:
> Allow giving filter instances names, in anticipation of the upcoming
> AVFilterGraph structure and related functions.
> 
> 
> Modified:
>    libavfilter/avfilter.c
>    libavfilter/avfilter.h
>    libavfilter/filter_test.c
> 
> Modified: libavfilter/avfilter.c
> ==============================================================================
> --- libavfilter/avfilter.c	(original)
> +++ libavfilter/avfilter.c	Sat Jul 14 21:33:28 2007
> @@ -288,13 +288,14 @@ static const char *filter_name(void *p)
>      return filter->filter->name;
>  }
>  
> -AVFilterContext *avfilter_create(AVFilter *filter)
> +AVFilterContext *avfilter_create(AVFilter *filter, char *inst_name)
>  {
>      AVFilterContext *ret = av_malloc(sizeof(AVFilterContext));
>  
>      ret->av_class = av_mallocz(sizeof(AVClass));
>      ret->av_class->item_name = filter_name;
>      ret->filter   = filter;
> +    ret->name     = inst_name ? strdup(inst_name) : NULL;

av_strdup


>      ret->inputs   = av_mallocz(sizeof(AVFilterLink*) * pad_count(filter->inputs));
>      ret->outputs  = av_mallocz(sizeof(AVFilterLink*) * pad_count(filter->outputs));
>      ret->priv     = av_mallocz(filter->priv_size);
> @@ -320,6 +321,7 @@ void avfilter_destroy(AVFilterContext *f
>          av_free(filter->outputs[i]);
>      }
>  
> +    free   (filter->name);
>      av_free(filter->inputs);
>      av_free(filter->outputs);

av_free 

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

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20070714/15e8748a/attachment.pgp>


More information about the FFmpeg-soc mailing list