Godspped
Godspped

Reputation: 743

avfilter_graph_create_filter, error value -12

I am having some problems creating a graph filter, I keep getting an error -12 on the ret val, I am not sure why, I made sure buffersrc_ctx and filter_graph are allocated.

Where can I go to look for what error -12 is, and if anyone can tell me if they see anything that would be greatly appreciated!

Thanks in advance

_snprintf( args, sizeof(args), 
           "time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%u", 
        pFormatCtx->streams[audioStream]->time_base.num, 
            pFormatCtx->streams[audioStream]->time_base.den,
        dec_ctx->sample_rate,
        av_get_sample_fmt_name(dec_ctx->sample_fmt),
        dec_ctx->channel_layout );

ret = avfilter_graph_create_filter(&buffersrc_ctx, 
                                   buffersrc, 
                                   NULL, args, NULL, filter_graph);

Upvotes: 2

Views: 2045

Answers (1)

Tyraek
Tyraek

Reputation: 51

I believe it is somehow late to answer this question, but in case someone stumbles across the same problem as I have, this could help.

If the buffersrc is NULL it probably is because you forgot to register the filters with the command: avfilter_register_all();

Upvotes: 5

Related Questions