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

libavfilter/avfiltergraph.c:557:24: Call
555. 
556.         for (j = 0; j < filter->nb_inputs; j++)
557.             if ((ret = pick_format(filter->inputs[j])) < 0)
                            ^
558.                 return ret;
559.         for (j = 0; j < filter->nb_outputs; j++)

libavfilter/avfiltergraph.c:282:1: Parameter `link->out_samplerates->refcount`
  280. }
  281. 
  282. static int pick_format(AVFilterLink *link)
       ^
  283. {
  284.     if (!link || !link->in_formats)

libavfilter/avfiltergraph.c:557:24: Call
555. 
556.         for (j = 0; j < filter->nb_inputs; j++)
557.             if ((ret = pick_format(filter->inputs[j])) < 0)
                            ^
558.                 return ret;
559.         for (j = 0; j < filter->nb_outputs; j++)

libavfilter/avfiltergraph.c:282:1: Parameter `link->in_formats->refcount`
  280. }
  281. 
  282. static int pick_format(AVFilterLink *link)
       ^
  283. {
  284.     if (!link || !link->in_formats)

libavfilter/avfiltergraph.c:310:5: Call
  308.     }
  309. 
  310.     ff_formats_unref(&link->in_formats);
           ^
  311.     ff_formats_unref(&link->out_formats);
  312.     ff_formats_unref(&link->in_samplerates);

libavfilter/formats.c:295:1: <LHS trace>
293. } while (0)
294. 
295. void ff_formats_unref(AVFilterFormats **ref)
     ^
296. {
297.     FORMATS_UNREF(ref, formats);

libavfilter/formats.c:295:1: Parameter `(*ref)->refcount`
    293. } while (0)
    294. 
    295. void ff_formats_unref(AVFilterFormats **ref)
         ^
    296. {
    297.     FORMATS_UNREF(ref, formats);

libavfilter/formats.c:297:5: Binary operation: ([0, +oo] - 1):unsigned32 by call to `pick_format` 
    295. void ff_formats_unref(AVFilterFormats **ref)
    296. {
    297.     FORMATS_UNREF(ref, formats);
             ^
    298. }
    299. 

void ff_formats_unref(AVFilterFormats **ref)
{
    FORMATS_UNREF(ref, formats);
}
['static int pick_formats(AVFilterGraph *graph)\n{\n    int i, j, ret;\n    for (i = 0; i < graph->filter_count; i++) {\n        AVFilterContext *filter = graph->filters[i];\n        for (j = 0; j < filter->nb_inputs; j++)\n            if ((ret = pick_format(filter->inputs[j])) < 0)\n                return ret;\n        for (j = 0; j < filter->nb_outputs; j++)\n            if ((ret = pick_format(filter->outputs[j])) < 0)\n                return ret;\n    }\n    return 0;\n}', 'static int pick_format(AVFilterLink *link)\n{\n    if (!link || !link->in_formats)\n        return 0;\n    link->in_formats->format_count = 1;\n    link->format = link->in_formats->formats[0];\n    if (link->type == AVMEDIA_TYPE_AUDIO) {\n        if (!link->in_samplerates->format_count) {\n            av_log(link->src, AV_LOG_ERROR, "Cannot select sample rate for"\n                   " the link between filters %s and %s.\\n", link->src->name,\n                   link->dst->name);\n            return AVERROR(EINVAL);\n        }\n        link->in_samplerates->format_count = 1;\n        link->sample_rate = link->in_samplerates->formats[0];\n        if (!link->in_channel_layouts->nb_channel_layouts) {\n            av_log(link->src, AV_LOG_ERROR, "Cannot select channel layout for"\n                   "the link between filters %s and %s.\\n", link->src->name,\n                   link->dst->name);\n            return AVERROR(EINVAL);\n        }\n        link->in_channel_layouts->nb_channel_layouts = 1;\n        link->channel_layout = link->in_channel_layouts->channel_layouts[0];\n    }\n    ff_formats_unref(&link->in_formats);\n    ff_formats_unref(&link->out_formats);\n    ff_formats_unref(&link->in_samplerates);\n    ff_formats_unref(&link->out_samplerates);\n    ff_channel_layouts_unref(&link->in_channel_layouts);\n    ff_channel_layouts_unref(&link->out_channel_layouts);\n    return 0;\n}', 'void ff_formats_unref(AVFilterFormats **ref)\n{\n    FORMATS_UNREF(ref, formats);\n}']