void av_free(void *ptr)
{
#if CONFIG_MEMALIGN_HACK
    if (ptr)
        free((char *)ptr - ((char *)ptr)[-1]);
#elif HAVE_ALIGNED_MALLOC
    _aligned_free(ptr);
#else
    free(ptr);
#endif
}
['int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,\n                          AVFilterInOut **inputs,\n                          AVFilterInOut **outputs)\n{\n    int index = 0, ret;\n    char chr = 0;\n    AVFilterInOut *curr_inputs = NULL, *open_inputs = NULL, *open_outputs = NULL;\n    filters += strspn(filters, WHITESPACES);\n    if ((ret = parse_sws_flags(&filters, graph)) < 0)\n        goto fail;\n    do {\n        AVFilterContext *filter;\n        filters += strspn(filters, WHITESPACES);\n        if ((ret = parse_inputs(&filters, &curr_inputs, &open_outputs, graph)) < 0)\n            goto fail;\n        if ((ret = parse_filter(&filter, &filters, graph, index, graph)) < 0)\n            goto fail;\n        if ((ret = link_filter_inouts(filter, &curr_inputs, &open_inputs, graph)) < 0)\n            goto fail;\n        if ((ret = parse_outputs(&filters, &curr_inputs, &open_inputs, &open_outputs,\n                                 graph)) < 0)\n            goto fail;\n        filters += strspn(filters, WHITESPACES);\n        chr = *filters++;\n        if (chr == \';\' && curr_inputs)\n            append_inout(&open_outputs, &curr_inputs);\n        index++;\n    } while (chr == \',\' || chr == \';\');\n    if (chr) {\n        av_log(graph, AV_LOG_ERROR,\n               "Unable to parse graph description substring: \\"%s\\"\\n",\n               filters - 1);\n        ret = AVERROR(EINVAL);\n        goto fail;\n    }\n    append_inout(&open_outputs, &curr_inputs);\n    *inputs  = open_inputs;\n    *outputs = open_outputs;\n    return 0;\n fail:\n    while (graph->nb_filters)\n        avfilter_free(graph->filters[0]);\n    av_freep(&graph->filters);\n    avfilter_inout_free(&open_inputs);\n    avfilter_inout_free(&open_outputs);\n    avfilter_inout_free(&curr_inputs);\n    *inputs  = NULL;\n    *outputs = NULL;\n    return ret;\n}', 'void avfilter_free(AVFilterContext *filter)\n{\n    int i;\n    if (filter->graph)\n        ff_filter_graph_remove_filter(filter->graph, filter);\n    if (filter->filter->uninit)\n        filter->filter->uninit(filter);\n    for (i = 0; i < filter->nb_inputs; i++) {\n        free_link(filter->inputs[i]);\n    }\n    for (i = 0; i < filter->nb_outputs; i++) {\n        free_link(filter->outputs[i]);\n    }\n    if (filter->filter->priv_class)\n        av_opt_free(filter->priv);\n    av_freep(&filter->name);\n    av_freep(&filter->input_pads);\n    av_freep(&filter->output_pads);\n    av_freep(&filter->inputs);\n    av_freep(&filter->outputs);\n    av_freep(&filter->priv);\n    av_freep(&filter->internal);\n    av_free(filter);\n}', 'void av_free(void *ptr)\n{\n#if CONFIG_MEMALIGN_HACK\n    if (ptr)\n        free((char *)ptr - ((char *)ptr)[-1]);\n#elif HAVE_ALIGNED_MALLOC\n    _aligned_free(ptr);\n#else\n    free(ptr);\n#endif\n}']