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

libavfilter/vf_transpose.c:187:5: Call
185.     }
186. 
187.     avfilter_unref_buffer(inpic);
         ^
188.     avfilter_draw_slice(outlink, 0, outpic->video->h, 1);
189.     avfilter_end_frame(outlink);

libavfilter/avfilter.c:71:1: <LHS trace>
69. }
70. 
71. void avfilter_unref_buffer(AVFilterBufferRef *ref)
    ^
72. {
73.     if (!ref)

libavfilter/avfilter.c:71:1: Parameter `ref->buf->refcount`
  69. }
  70. 
  71. void avfilter_unref_buffer(AVFilterBufferRef *ref)
      ^
  72. {
  73.     if (!ref)

libavfilter/avfilter.c:75:11: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avfilter_unref_buffer` 
  73.     if (!ref)
  74.         return;
  75.     if (!(--ref->buf->refcount))
                ^
  76.         ref->buf->free(ref->buf);
  77.     av_free(ref->video);

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    TransContext *trans = inlink->dst->priv;\n    AVFilterBufferRef *inpic  = inlink->cur_buf;\n    AVFilterBufferRef *outpic = inlink->dst->outputs[0]->out_buf;\n    AVFilterLink *outlink = inlink->dst->outputs[0];\n    int plane;\n    for (plane = 0; outpic->data[plane]; plane++) {\n        int hsub = plane == 1 || plane == 2 ? trans->hsub : 0;\n        int vsub = plane == 1 || plane == 2 ? trans->vsub : 0;\n        int pixstep = trans->pixsteps[plane];\n        int inh  = inpic->video->h>>vsub;\n        int outw = outpic->video->w>>hsub;\n        int outh = outpic->video->h>>vsub;\n        uint8_t *out, *in;\n        int outlinesize, inlinesize;\n        int x, y;\n        out = outpic->data[plane]; outlinesize = outpic->linesize[plane];\n        in  = inpic ->data[plane]; inlinesize  = inpic ->linesize[plane];\n        if (trans->dir&1) {\n            in +=  inpic->linesize[plane] * (inh-1);\n            inlinesize *= -1;\n        }\n        if (trans->dir&2) {\n            out += outpic->linesize[plane] * (outh-1);\n            outlinesize *= -1;\n        }\n        for (y = 0; y < outh; y++) {\n            switch (pixstep) {\n            case 1:\n                for (x = 0; x < outw; x++)\n                    out[x] = in[x*inlinesize + y];\n                break;\n            case 2:\n                for (x = 0; x < outw; x++)\n                    *((uint16_t *)(out + 2*x)) = *((uint16_t *)(in + x*inlinesize + y*2));\n                break;\n            case 3:\n                for (x = 0; x < outw; x++) {\n                    int32_t v = AV_RB24(in + x*inlinesize + y*3);\n                    AV_WB24(out + 3*x, v);\n                }\n                break;\n            case 4:\n                for (x = 0; x < outw; x++)\n                    *((uint32_t *)(out + 4*x)) = *((uint32_t *)(in + x*inlinesize + y*4));\n                break;\n            }\n            out += outlinesize;\n        }\n    }\n    avfilter_unref_buffer(inpic);\n    avfilter_draw_slice(outlink, 0, outpic->video->h, 1);\n    avfilter_end_frame(outlink);\n    avfilter_unref_buffer(outpic);\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}']