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

libavfilter/vsrc_color.c:140:5: Call
138. 
139.     avfilter_start_frame(link, avfilter_ref_buffer(picref, ~0));
140.     ff_draw_rectangle(picref->data, picref->linesize,
         ^
141.                       color->line, color->line_step, color->hsub, color->vsub,
142.                       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:143:5: Call
141.                       color->line, color->line_step, color->hsub, color->vsub,
142.                       0, 0, color->w, color->h);
143.     avfilter_draw_slice(link, 0, color->h, 1);
         ^
144.     avfilter_end_frame(link);
145.     avfilter_unref_buffer(picref);

libavfilter/avfilter.c:442:1: Parameter `link->cur_buf->linesize[*]`
  440. }
  441. 
  442. void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
       ^
  443. {
  444.     uint8_t *src[4], *dst[4];

libavfilter/vsrc_color.c:145:5: Call
143.     avfilter_draw_slice(link, 0, color->h, 1);
144.     avfilter_end_frame(link);
145.     avfilter_unref_buffer(picref);
         ^
146. 
147.     return 0;

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

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

libavfilter/avfilter.c:76:11: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avfilter_unref_buffer` 
  74.     if (!ref)
  75.         return;
  76.     if (!(--ref->buf->refcount))
                ^
  77.         ref->buf->free(ref->buf);
  78.     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 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                 = av_rescale_q(color->pts++, color->time_base, AV_TIME_BASE_Q);\n    picref->pos                 = 0;\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    av_free(ref->video);\n    av_free(ref->audio);\n    av_free(ref);\n}']