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

libavfilter/vf_pad.c:307:15: Call
305.                                   + (pad->y  >> vsub) * outpicref->linesize [plane];
306. 
307.         if(   does_clip(pad, outpicref, plane, hsub, vsub, 0, 0)
                   ^
308.            || does_clip(pad, outpicref, plane, hsub, vsub, 0, pad->h-1)
309.            || does_clip(pad, outpicref, plane, hsub, vsub, pad->w-1, 0)

libavfilter/vf_pad.c:266:1: Parameter `outpicref->buf->linesize[*]`
  264. }
  265. 
  266. static int does_clip(PadContext *pad, AVFilterBufferRef *outpicref, int plane, int hsub, int vsub, int x, int y)
       ^
  267. {
  268.     int64_t x_in_buf, y_in_buf;

libavfilter/vf_pad.c:308:15: Call
306. 
307.         if(   does_clip(pad, outpicref, plane, hsub, vsub, 0, 0)
308.            || does_clip(pad, outpicref, plane, hsub, vsub, 0, pad->h-1)
                   ^
309.            || does_clip(pad, outpicref, plane, hsub, vsub, pad->w-1, 0)
310.            || does_clip(pad, outpicref, plane, hsub, vsub, pad->w-1, pad->h-1)

libavfilter/vf_pad.c:266:1: Parameter `outpicref->buf->linesize[*]`
  264. }
  265. 
  266. static int does_clip(PadContext *pad, AVFilterBufferRef *outpicref, int plane, int hsub, int vsub, int x, int y)
       ^
  267. {
  268.     int64_t x_in_buf, y_in_buf;

libavfilter/vf_pad.c:309:15: Call
307.         if(   does_clip(pad, outpicref, plane, hsub, vsub, 0, 0)
308.            || does_clip(pad, outpicref, plane, hsub, vsub, 0, pad->h-1)
309.            || does_clip(pad, outpicref, plane, hsub, vsub, pad->w-1, 0)
                   ^
310.            || does_clip(pad, outpicref, plane, hsub, vsub, pad->w-1, pad->h-1)
311.           )

libavfilter/vf_pad.c:266:1: Parameter `outpicref->buf->linesize[*]`
  264. }
  265. 
  266. static int does_clip(PadContext *pad, AVFilterBufferRef *outpicref, int plane, int hsub, int vsub, int x, int y)
       ^
  267. {
  268.     int64_t x_in_buf, y_in_buf;

libavfilter/vf_pad.c:310:15: Call
308.            || does_clip(pad, outpicref, plane, hsub, vsub, 0, pad->h-1)
309.            || does_clip(pad, outpicref, plane, hsub, vsub, pad->w-1, 0)
310.            || does_clip(pad, outpicref, plane, hsub, vsub, pad->w-1, pad->h-1)
                   ^
311.           )
312.             break;

libavfilter/vf_pad.c:266:1: Parameter `outpicref->buf->linesize[*]`
  264. }
  265. 
  266. static int does_clip(PadContext *pad, AVFilterBufferRef *outpicref, int plane, int hsub, int vsub, int x, int y)
       ^
  267. {
  268.     int64_t x_in_buf, y_in_buf;

libavfilter/vf_pad.c:317:9: Call
315.     if(pad->needs_copy){
316.         av_log(inlink->dst, AV_LOG_DEBUG, "Direct padding impossible allocating new frame\n");
317.         avfilter_unref_buffer(outpicref);
             ^
318.         outpicref = avfilter_get_video_buffer(inlink->dst->outputs[0], AV_PERM_WRITE | AV_PERM_NEG_LINESIZES,
319.                                                        FFMAX(inlink->w, pad->w),

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

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

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