libavfilter/vf_select.c:266: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `avfilter_unref_buffer`.

libavfilter/vf_select.c:266:5: Call
264.         avfilter_end_frame(inlink->dst->outputs[0]);
265.     }
266.     avfilter_unref_buffer(picref);
         ^
267. }
268. 

libavfilter/avfilter.c:87:1: <LHS trace>
85. }
86. 
87. void avfilter_unref_buffer(AVFilterBufferRef *ref)
    ^
88. {
89.     if (!ref)

libavfilter/avfilter.c:87:1: Parameter `ref->buf->refcount`
  85. }
  86. 
  87. void avfilter_unref_buffer(AVFilterBufferRef *ref)
      ^
  88. {
  89.     if (!ref)

libavfilter/avfilter.c:91:11: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avfilter_unref_buffer` 
  89.     if (!ref)
  90.         return;
  91.     if (!(--ref->buf->refcount))
                ^
  92.         ref->buf->free(ref->buf);
  93.     if (ref->extended_data != ref->data)

void avfilter_unref_buffer(AVFilterBufferRef *ref)
{
    if (!ref)
        return;
    if (!(--ref->buf->refcount))
        ref->buf->free(ref->buf);
    if (ref->extended_data != ref->data)
        av_freep(&ref->extended_data);
    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    if (ref->extended_data != ref->data)\n        av_freep(&ref->extended_data);\n    av_free(ref->video);\n    av_free(ref->audio);\n    av_free(ref);\n}']