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

libavfilter/vsrc_buffer.c:112:5: Assignment
110.     picref->pixel_aspect = c->pixel_aspect;
111.     picref->interlaced      = c->frame.interlaced_frame;
112.     picref->top_field_first = c->frame.top_field_first;
         ^
113.     avfilter_start_frame(link, avfilter_ref_pic(picref, ~0));
114.     avfilter_draw_slice(link, 0, link->h, 1);

libavfilter/vsrc_buffer.c:114:5: Call
112.     picref->top_field_first = c->frame.top_field_first;
113.     avfilter_start_frame(link, avfilter_ref_pic(picref, ~0));
114.     avfilter_draw_slice(link, 0, link->h, 1);
         ^
115.     avfilter_end_frame(link);
116.     avfilter_unref_pic(picref);

libavfilter/avfilter.c:296:1: Parameter `link->cur_pic->linesize[*]`
  294. }
  295. 
  296. void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
       ^
  297. {
  298.     uint8_t *src[4], *dst[4];

libavfilter/vsrc_buffer.c:116:5: Call
114.     avfilter_draw_slice(link, 0, link->h, 1);
115.     avfilter_end_frame(link);
116.     avfilter_unref_pic(picref);
         ^
117. 
118.     c->has_frame = 0;

libavfilter/avfilter.c:56:1: <LHS trace>
54. }
55. 
56. void avfilter_unref_pic(AVFilterPicRef *ref)
    ^
57. {
58.     if(!(--ref->pic->refcount))

libavfilter/avfilter.c:56:1: Parameter `ref->pic->refcount`
  54. }
  55. 
  56. void avfilter_unref_pic(AVFilterPicRef *ref)
      ^
  57. {
  58.     if(!(--ref->pic->refcount))

libavfilter/avfilter.c:58:10: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avfilter_unref_pic` 
  56. void avfilter_unref_pic(AVFilterPicRef *ref)
  57. {
  58.     if(!(--ref->pic->refcount))
               ^
  59.         ref->pic->free(ref->pic);
  60.     av_free(ref);

void avfilter_unref_pic(AVFilterPicRef *ref)
{
    if(!(--ref->pic->refcount))
        ref->pic->free(ref->pic);
    av_free(ref);
}
['static int request_frame(AVFilterLink *link)\n{\n    BufferSourceContext *c = link->src->priv;\n    AVFilterPicRef *picref;\n    if (!c->has_frame) {\n        av_log(link->src, AV_LOG_ERROR,\n               "request_frame() called with no available frame!\\n");\n    }\n    picref = avfilter_get_video_buffer(link, AV_PERM_WRITE | AV_PERM_PRESERVE |\n                                       AV_PERM_REUSE2,\n                                       link->w, link->h);\n    av_picture_copy((AVPicture *)&picref->data, (AVPicture *)&c->frame,\n                    picref->pic->format, link->w, link->h);\n    picref->pts = c->pts;\n    picref->pixel_aspect = c->pixel_aspect;\n    picref->interlaced      = c->frame.interlaced_frame;\n    picref->top_field_first = c->frame.top_field_first;\n    avfilter_start_frame(link, avfilter_ref_pic(picref, ~0));\n    avfilter_draw_slice(link, 0, link->h, 1);\n    avfilter_end_frame(link);\n    avfilter_unref_pic(picref);\n    c->has_frame = 0;\n    return 0;\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    DPRINTF_START(NULL, draw_slice); dprintf_link(NULL, link, 0); dprintf(NULL, " y:%d h:%d dir:%d\\n", y, h, slice_dir);\n    if(link->srcpic) {\n        vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h;\n        for(i = 0; i < 4; i ++) {\n            if(link->srcpic->data[i]) {\n                src[i] = link->srcpic-> data[i] +\n                    (y >> (i==0 ? 0 : vsub)) * link->srcpic-> linesize[i];\n                dst[i] = link->cur_pic->data[i] +\n                    (y >> (i==0 ? 0 : vsub)) * link->cur_pic->linesize[i];\n            } else\n                src[i] = dst[i] = NULL;\n        }\n        for(i = 0; i < 4; i ++) {\n            int planew =\n                ff_get_plane_bytewidth(link->format, link->cur_pic->w, i);\n            if(!src[i]) continue;\n            for(j = 0; j < h >> (i==0 ? 0 : vsub); j ++) {\n                memcpy(dst[i], src[i], planew);\n                src[i] += link->srcpic ->linesize[i];\n                dst[i] += link->cur_pic->linesize[i];\n            }\n        }\n    }\n    if(!(draw_slice = link_dpad(link).draw_slice))\n        draw_slice = avfilter_default_draw_slice;\n    draw_slice(link, y, h, slice_dir);\n}', 'void avfilter_unref_pic(AVFilterPicRef *ref)\n{\n    if(!(--ref->pic->refcount))\n        ref->pic->free(ref->pic);\n    av_free(ref);\n}']