Mention explicitly that no options can be set manually when using this function.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -845,9 +845,9 @@ AVFilterContext *avfilter_graph_alloc_filter(AVFilterGraph *graph, · 844 unmodified lines | ||
| 845 | 845 | AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, const char *name); |
| 846 | 846 | |
| 847 | 847 | /** |
| 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. | |
| 851 | 851 | * |
| 852 | 852 | * In case of success put in *filt_ctx the pointer to the created |
| 853 | 853 | * 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 | ||
| 856 | 856 | * @param graph_ctx the filter graph |
| 857 | 857 | * @return a negative AVERROR error code in case of failure, a non |
| 858 | 858 | * 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. | |
| 859 | 865 | */ |
| 860 | 866 | int avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter *filt, |
| 861 | 867 | const char *name, const char *args, void *opaque, |