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

libavfilter/avfilter.c:646:9: Unknown value from: non-const function
644. 
645.     if (filter->filter->uninit)
646.         filter->filter->uninit(filter);
             ^
647. 
648.     for (i = 0; i < filter->input_count; i++) {

libavfilter/avfilter.c:652:13: Call
650.             if (link->src)
651.                 link->src->outputs[link->srcpad - link->src->output_pads] = NULL;
652.             avfilter_formats_unref(&link->in_formats);
                 ^
653.             avfilter_formats_unref(&link->out_formats);
654.         }

libavfilter/formats.c:152:1: <LHS trace>
150. }
151. 
152. void avfilter_formats_unref(AVFilterFormats **ref)
     ^
153. {
154.     int idx;

libavfilter/formats.c:152:1: Parameter `(*ref)->refcount`
  150. }
  151. 
  152. void avfilter_formats_unref(AVFilterFormats **ref)
       ^
  153. {
  154.     int idx;

libavfilter/formats.c:159:11: Call
  157.         return;
  158. 
  159.     idx = find_ref_index(ref);
                 ^
  160. 
  161.     if(idx >= 0)

libavfilter/formats.c:143:1: Parameter `(*ref)->refcount`
    141. }
    142. 
    143. static int find_ref_index(AVFilterFormats **ref)
         ^
    144. {
    145.     int i;

libavfilter/formats.c:165:9: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avfilter_formats_unref` 
  163.             sizeof(*(*ref)->refs) * ((*ref)->refcount - idx - 1));
  164. 
  165.     if(!--(*ref)->refcount) {
               ^
  166.         av_free((*ref)->formats);
  167.         av_free((*ref)->refs);
