[FFmpeg-soc] [soc]: r417 - in libavfilter: avfilter.c avfilter.h filter_test.c
Bobby Bingham
uhmmmm at gmail.com
Sat Jul 14 21:54:47 CEST 2007
On Sat, 14 Jul 2007 21:35:24 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:
> 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
>
Ok. will fix. I didn't notice the existence of av_strdup because I
looked in avutil/string.c and didn't see it there. I think it makes
more sense to have it there with the other string functions. Should I
send a patch to move it?
>
> > 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
>
> [...]
--
Bobby Bingham
Never trust atoms. Or anything made of atoms.
このメールは再利用されたバイトでできている。
More information about the FFmpeg-soc
mailing list