[Libav-user] error when calling avfilter_graph_create_filter

Richard Schilling coderroadie at gmail.com
Wed Mar 27 23:30:47 CET 2013

I think I'm passing all the right parameters to avfilter_graph_create_filter, but I still get a return value of -22, which seems to indicate a parameter problem.  I'm missing some detail here….

Can anyone tell me what's wrong with the call to avfilter_graph_create_filter  in the function below? Thanks.

int filtersetup(){
	AVFilterContext *in_filter_ctx;
	AVFilterContext *out_filter_ctx;
	AVFilterGraph *graph;
	AVFilter *input_filter, *output_filter;
	char *sample_fmts, *sample_rates, *channel_layouts;
	AVFilterInOut *outputs, *inputs;

	char args[256];
	int ret;

	outputs = avfilter_inout_alloc();
	inputs = avfilter_inout_alloc();
	graph = avfilter_graph_alloc();

	input_filter = avfilter_get_by_name("abuffer");
	output_filter = avfilter_get_by_name("abuffersink");

	__android_log_print(ANDROID_LOG_INFO, "aphex_dsp",

	ret = avfilter_graph_create_filter(&in_filter_ctx,
			input_filter, "src", args, NULL, graph);

	if (ret < 0) {
		// ret = -22
		__android_log_print(ANDROID_LOG_ERROR, "aphex_dsp",
				"unable to create input filter: %d", ret);
		return ret;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130327/9b7a1a47/attachment.html>

More information about the Libav-user mailing list