History

lavfi: clarify the behaviour of avfilter_graph_create_filter()

Mention explicitly that no options can be set manually when using this function.

Anton Khirnov committed 2 years ago

Commit ca860d81 parent d3f76db1 file · +9 −3Browse files

Unified · Split

libavfilter/avfilter.h+9−3
@@ -845,9 +845,9 @@ AVFilterContext *avfilter_graph_alloc_filter(AVFilterGraph *graph, · 844 unmodified lines
845845 AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, const char *name);
846846
847847 /**
848− * Create and add a filter instance into an existing graph.
849− * The filter instance is created from the filter filt and inited
850− * with the parameter args. opaque is currently ignored.
848+ * A convenience wrapper that allocates and initializes a filter in a single
849+ * step. The filter instance is created from the filter filt and inited with the
850+ * parameter args. opaque is currently ignored.
851851 *
852852 * In case of success put in *filt_ctx the pointer to the created
853853 * filter instance, otherwise set *filt_ctx to NULL.
@@ -856,6 +856,12 @@ AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, const char *nam · 2 unmodified lines
856856 * @param graph_ctx the filter graph
857857 * @return a negative AVERROR error code in case of failure, a non
858858 * negative value otherwise
859+ *
860+ * @warning Since the filter is initialized after this function successfully
861+ * returns, you MUST NOT set any further options on it. If you need to
862+ * do that, call ::avfilter_graph_alloc_filter(), followed by setting
863+ * the options, followed by ::avfilter_init_dict() instead of this
864+ * function.
859865 */
860866 int avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter *filt,
861867 const char *name, const char *args, void *opaque,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t