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

libavfilter/avfiltergraph.c:268:13: Call
266. 
267.         for (j = 0; j < filter->input_count; j++)
268.             pick_format(filter->inputs[j]);
                 ^
269.         for (j = 0; j < filter->output_count; j++)
270.             pick_format(filter->outputs[j]);

libavfilter/avfiltergraph.c:205:1: Parameter `link->out_formats->refcount`
  203. }
  204. 
  205. static void pick_format(AVFilterLink *link)
       ^
  206. {
  207.     if (!link || !link->in_formats)

libavfilter/avfiltergraph.c:268:13: Call
266. 
267.         for (j = 0; j < filter->input_count; j++)
268.             pick_format(filter->inputs[j]);
                 ^
269.         for (j = 0; j < filter->output_count; j++)
270.             pick_format(filter->outputs[j]);

libavfilter/avfiltergraph.c:205:1: Parameter `link->out_formats->refcount`
  203. }
  204. 
  205. static void pick_format(AVFilterLink *link)
       ^
  206. {
  207.     if (!link || !link->in_formats)

libavfilter/avfiltergraph.c:214:5: Call
  212. 
  213.     avfilter_formats_unref(&link->in_formats);
  214.     avfilter_formats_unref(&link->out_formats);
           ^
  215. }
  216. 

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 `pick_format` 
    163.             sizeof(*(*ref)->refs) * ((*ref)->refcount - idx - 1));
    164. 
    165.     if(!--(*ref)->refcount) {
                 ^
    166.         av_free((*ref)->formats);
    167.         av_free((*ref)->refs);
