void avfilter_unref_buffer(AVFilterBufferRef *ref)
{
    if(!(--ref->buf->refcount))
        ref->buf->free(ref->buf);
    av_free(ref->video);
    av_free(ref);
}
['void avfilter_default_end_frame(AVFilterLink *link)\n{\n    AVFilterLink *out = NULL;\n    if(link->dst->output_count)\n        out = link->dst->outputs[0];\n    avfilter_unref_buffer(link->cur_buf);\n    link->cur_buf = NULL;\n    if(out) {\n        if(out->out_buf) {\n            avfilter_unref_buffer(out->out_buf);\n            out->out_buf = NULL;\n        }\n        avfilter_end_frame(out);\n    }\n}', 'void avfilter_unref_buffer(AVFilterBufferRef *ref)\n{\n    if(!(--ref->buf->refcount))\n        ref->buf->free(ref->buf);\n    av_free(ref->video);\n    av_free(ref);\n}']