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

libavfilter/vsrc_color.c:147:5: Call
145. 
146.     avfilter_start_frame(link, avfilter_ref_buffer(picref, ~0));
147.     ff_draw_rectangle(picref->data, picref->linesize,
         ^
148.                       color->line, color->line_step, color->hsub, color->vsub,
149.                       0, 0, color->w, color->h);

libavfilter/drawutils.c:79:1: Parameter `**dst`
  77. }
  78. 
  79. void ff_draw_rectangle(uint8_t *dst[4], int dst_linesize[4],
      ^
  80.                        uint8_t *src[4], int pixelstep[4],
  81.                        int hsub, int vsub, int x, int y, int w, int h)

libavfilter/vsrc_color.c:150:5: Call
148.                       color->line, color->line_step, color->hsub, color->vsub,
149.                       0, 0, color->w, color->h);
150.     avfilter_draw_slice(link, 0, color->h, 1);
         ^
151.     avfilter_end_frame(link);
152.     avfilter_unref_buffer(picref);

libavfilter/avfilter.c:534:1: Parameter `link->cur_buf->linesize[*]`
  532. }
  533. 
  534. void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
       ^
  535. {
  536.     uint8_t *src[4], *dst[4];

libavfilter/vsrc_color.c:152:5: Call
150.     avfilter_draw_slice(link, 0, color->h, 1);
151.     avfilter_end_frame(link);
152.     avfilter_unref_buffer(picref);
         ^
153. 
154.     return 0;

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 int color_request_frame(AVFilterLink *link)\n{\n    ColorContext *color = link->src->priv;\n    AVFilterBufferRef *picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, color->w, color->h);\n    picref->video->pixel_aspect = (AVRational) {1, 1};\n    picref->pts                 = color->pts++;\n    picref->pos                 = -1;\n    avfilter_start_frame(link, avfilter_ref_buffer(picref, ~0));\n    ff_draw_rectangle(picref->data, picref->linesize,\n                      color->line, color->line_step, color->hsub, color->vsub,\n                      0, 0, color->w, color->h);\n    avfilter_draw_slice(link, 0, color->h, 1);\n    avfilter_end_frame(link);\n    avfilter_unref_buffer(picref);\n    return 0;\n}', 'void ff_draw_rectangle(uint8_t *dst[4], int dst_linesize[4],\n                       uint8_t *src[4], int pixelstep[4],\n                       int hsub, int vsub, int x, int y, int w, int h)\n{\n    int i, plane;\n    uint8_t *p;\n    for (plane = 0; plane < 4 && dst[plane]; plane++) {\n        int hsub1 = plane == 1 || plane == 2 ? hsub : 0;\n        int vsub1 = plane == 1 || plane == 2 ? vsub : 0;\n        p = dst[plane] + (y >> vsub1) * dst_linesize[plane];\n        for (i = 0; i < (h >> vsub1); i++) {\n            memcpy(p + (x >> hsub1) * pixelstep[plane],\n                   src[plane], (w >> hsub1) * pixelstep[plane]);\n            p += dst_linesize[plane];\n        }\n    }\n}', 'void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)\n{\n    uint8_t *src[4], *dst[4];\n    int i, j, vsub;\n    void (*draw_slice)(AVFilterLink *, int, int, int);\n    FF_DPRINTF_START(NULL, draw_slice); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " y:%d h:%d dir:%d\\n", y, h, slice_dir);\n    if (link->src_buf) {\n        vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h;\n        for (i = 0; i < 4; i++) {\n            if (link->src_buf->data[i]) {\n                src[i] = link->src_buf-> data[i] +\n                    (y >> (i==1 || i==2 ? vsub : 0)) * link->src_buf-> linesize[i];\n                dst[i] = link->cur_buf->data[i] +\n                    (y >> (i==1 || i==2 ? vsub : 0)) * link->cur_buf->linesize[i];\n            } else\n                src[i] = dst[i] = NULL;\n        }\n        for (i = 0; i < 4; i++) {\n            int planew =\n                av_image_get_linesize(link->format, link->cur_buf->video->w, i);\n            if (!src[i]) continue;\n            for (j = 0; j < h >> (i==1 || i==2 ? vsub : 0); j++) {\n                memcpy(dst[i], src[i], planew);\n                src[i] += link->src_buf->linesize[i];\n                dst[i] += link->cur_buf->linesize[i];\n            }\n        }\n    }\n    if (!(draw_slice = link->dstpad->draw_slice))\n        draw_slice = avfilter_default_draw_slice;\n    draw_slice(link, y, h, slice_dir);\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}']