diff options
author | Måns Rullgård <mans@mansr.com> | 2008-03-07 09:08:28 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2008-03-07 09:08:28 +0000 |
commit | b049ad505478a099535a796306f619a4365ee707 (patch) | |
tree | f74a493b23386482b9e224e999687abfb7e65f87 /libavfilter | |
parent | cbaf50f85044d3f2b892674dd293b857d96dd654 (diff) | |
download | ffmpeg-streaming-b049ad505478a099535a796306f619a4365ee707.zip ffmpeg-streaming-b049ad505478a099535a796306f619a4365ee707.tar.gz |
fix AVClass for avfilter
Originally committed as revision 12357 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avfilter.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 0182e47..61bcfaf 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -323,6 +323,11 @@ static const char *filter_name(void *p) return filter->filter->name; } +static const AVClass avfilter_class = { + "AVFilter", + filter_name +}; + AVFilterContext *avfilter_open(AVFilter *filter, const char *inst_name) { AVFilterContext *ret; @@ -332,8 +337,7 @@ AVFilterContext *avfilter_open(AVFilter *filter, const char *inst_name) ret = av_malloc(sizeof(AVFilterContext)); - ret->av_class = av_mallocz(sizeof(AVClass)); - ret->av_class->item_name = filter_name; + ret->av_class = &avfilter_class; ret->filter = filter; ret->name = inst_name ? av_strdup(inst_name) : NULL; ret->priv = av_mallocz(filter->priv_size); @@ -375,7 +379,6 @@ void avfilter_destroy(AVFilterContext *filter) av_freep(&filter->inputs); av_freep(&filter->outputs); av_freep(&filter->priv); - av_freep(&filter->av_class); av_free(filter); } |