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

libavfilter/avfiltergraph.c:187:13: Call
185. 
186.         for(j = 0; j < filter->input_count; j ++)
187.             pick_format(filter->inputs[j]);
                 ^
188.         for(j = 0; j < filter->output_count; j ++)
189.             pick_format(filter->outputs[j]);

libavfilter/avfiltergraph.c:167:1: Parameter `link->out_formats->refcount`
  165. }
  166. 
  167. static void pick_format(AVFilterLink *link)
       ^
  168. {
  169.     if(!link || !link->in_formats)

libavfilter/avfiltergraph.c:187:13: Call
185. 
186.         for(j = 0; j < filter->input_count; j ++)
187.             pick_format(filter->inputs[j]);
                 ^
188.         for(j = 0; j < filter->output_count; j ++)
189.             pick_format(filter->outputs[j]);

libavfilter/avfiltergraph.c:167:1: Parameter `link->out_formats->refcount`
  165. }
  166. 
  167. static void pick_format(AVFilterLink *link)
       ^
  168. {
  169.     if(!link || !link->in_formats)

libavfilter/avfiltergraph.c:176:5: Call
  174. 
  175.     avfilter_formats_unref(&link->in_formats);
  176.     avfilter_formats_unref(&link->out_formats);
           ^
  177. }
  178. 

libavfilter/formats.c:134:1: <LHS trace>
132. }
133. 
134. void avfilter_formats_unref(AVFilterFormats **ref)
     ^
135. {
136.     int idx;

libavfilter/formats.c:134:1: Parameter `(*ref)->refcount`
    132. }
    133. 
    134. void avfilter_formats_unref(AVFilterFormats **ref)
         ^
    135. {
    136.     int idx;

libavfilter/formats.c:141:11: Call
    139.         return;
    140. 
    141.     idx = find_ref_index(ref);
                   ^
    142. 
    143.     if(idx >= 0)

libavfilter/formats.c:125:1: Parameter `(*ref)->refcount`
      123. }
      124. 
      125. static int find_ref_index(AVFilterFormats **ref)
           ^
      126. {
      127.     int i;

libavfilter/formats.c:147:9: Binary operation: ([0, +oo] - 1):unsigned32 by call to `pick_format` 
    145.             sizeof(AVFilterFormats**) * ((*ref)->refcount-idx-1));
    146. 
    147.     if(!--(*ref)->refcount) {
                 ^
    148.         av_free((*ref)->formats);
    149.         av_free((*ref)->refs);
