void avfilter_unref_buffer(AVFilterBufferRef *ref)
{
    if (!ref)
        return;
    if (!(--ref->buf->refcount))
        ref->buf->free(ref->buf);
    av_free(ref->video);
    av_free(ref->audio);
    av_free(ref);
}
['static void end_frame(AVFilterLink *inlink)\n{\n    SelectContext *select = inlink->dst->priv;\n    AVFilterBufferRef *picref = inlink->cur_buf;\n    if (select->select) {\n        if (select->cache_frames)\n            return;\n        avfilter_end_frame(inlink->dst->outputs[0]);\n    }\n    avfilter_unref_buffer(picref);\n}', 'void avfilter_unref_buffer(AVFilterBufferRef *ref)\n{\n    if (!ref)\n        return;\n    if (!(--ref->buf->refcount))\n        ref->buf->free(ref->buf);\n    av_free(ref->video);\n    av_free(ref->audio);\n    av_free(ref);\n}']