diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-03-18 11:27:38 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-04-01 09:03:35 +0200 |
commit | 996f9f0c3280552d293c3dbe4266938927fd5908 (patch) | |
tree | b131ed11f438af4febbe9e46e8181ee1de923413 /libavfilter/avfiltergraph.c | |
parent | ddb4431208745ea270dce8fce4cba999f0ed4303 (diff) | |
download | ffmpeg-996f9f0c3280552d293c3dbe4266938927fd5908.tar.gz |
avfiltergraph: add an AVClass to AVFilterGraph on next major bump.
It will be used for logging, possibly also AVOptions.
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r-- | libavfilter/avfiltergraph.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 8c43251c4c..9b73cc95ab 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -27,9 +27,23 @@ #include "avfiltergraph.h" #include "internal.h" +#include "libavutil/log.h" + +static const AVClass filtergraph_class = { + .class_name = "AVFilterGraph", + .item_name = av_default_item_name, + .version = LIBAVUTIL_VERSION_INT, +}; + AVFilterGraph *avfilter_graph_alloc(void) { - return av_mallocz(sizeof(AVFilterGraph)); + AVFilterGraph *ret = av_mallocz(sizeof(AVFilterGraph)); + if (!ret) + return NULL; +#if FF_API_GRAPH_AVCLASS + ret->av_class = &filtergraph_class; +#endif + return ret; } void avfilter_graph_free(AVFilterGraph **graph) |