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

libavfilter/vf_unsharp.c:228:5: Call
226.     apply_unsharp(out->data[2], out->linesize[2], in->data[2], in->linesize[2], cw,      ch,      &unsharp->chroma);
227. 
228.     avfilter_unref_buffer(in);
         ^
229.     ff_draw_slice(link->dst->outputs[0], 0, link->h, 1);
230.     ff_end_frame(link->dst->outputs[0]);

libavfilter/buffer.c:74:1: <LHS trace>
72. }
73. 
74. void avfilter_unref_buffer(AVFilterBufferRef *ref)
    ^
75. {
76.     if (!ref)

libavfilter/buffer.c:74:1: Parameter `ref->buf->refcount`
  72. }
  73. 
  74. void avfilter_unref_buffer(AVFilterBufferRef *ref)
      ^
  75. {
  76.     if (!ref)

libavfilter/buffer.c:78:11: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avfilter_unref_buffer` 
  76.     if (!ref)
  77.         return;
  78.     if (!(--ref->buf->refcount))
                ^
  79.         ref->buf->free(ref->buf);
  80.     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 *link)\n{\n    UnsharpContext *unsharp = link->dst->priv;\n    AVFilterBufferRef *in  = link->cur_buf;\n    AVFilterBufferRef *out = link->dst->outputs[0]->out_buf;\n    int cw = SHIFTUP(link->w, unsharp->hsub);\n    int ch = SHIFTUP(link->h, unsharp->vsub);\n    apply_unsharp(out->data[0], out->linesize[0], in->data[0], in->linesize[0], link->w, link->h, &unsharp->luma);\n    apply_unsharp(out->data[1], out->linesize[1], in->data[1], in->linesize[1], cw,      ch,      &unsharp->chroma);\n    apply_unsharp(out->data[2], out->linesize[2], in->data[2], in->linesize[2], cw,      ch,      &unsharp->chroma);\n    avfilter_unref_buffer(in);\n    ff_draw_slice(link->dst->outputs[0], 0, link->h, 1);\n    ff_end_frame(link->dst->outputs[0]);\n    avfilter_unref_buffer(out);\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}']