- if ((ret = ff_formats_ref(in , &ctx->inputs[0]->out_formats)) < 0 ||
- (ret = ff_formats_ref(out, &ctx->outputs[0]->in_formats)) < 0)
- goto fail;
- return 0;
-fail:
- if (in)
- av_freep(&in->formats);
- av_freep(&in);
- if (out)
- av_freep(&out->formats);
- av_freep(&out);
- return ret;
+ return ff_formats_ref(ff_make_format_list(out_fmts),
+ &ctx->outputs[0]->incfg.formats);