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

libavfilter/vf_fieldorder.c:60:24: Call
58.                   desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) &&
59.                 desc->nb_components && !desc->log2_chroma_h &&
60.                 (ret = ff_add_format(&formats, pix_fmt)) < 0) {
                           ^
61.                 ff_formats_unref(&formats);
62.                 return ret;

libavfilter/formats.c:199:1: Parameter `(*avff)->nb_formats`
  197. } while (0)
  198. 
  199. int ff_add_format(AVFilterFormats **avff, int fmt)
       ^
  200. {
  201.     ADD_FORMAT(avff, fmt, int, formats, nb_formats);

libavfilter/vf_fieldorder.c:61:17: Call
59.                 desc->nb_components && !desc->log2_chroma_h &&
60.                 (ret = ff_add_format(&formats, pix_fmt)) < 0) {
61.                 ff_formats_unref(&formats);
                    ^
62.                 return ret;
63.             }

libavfilter/formats.c:302:1: <LHS trace>
300. } while (0)
301. 
302. void ff_formats_unref(AVFilterFormats **ref)
     ^
303. {
304.     FORMATS_UNREF(ref, formats);

libavfilter/formats.c:302:1: Parameter `(*ref)->refcount`
  300. } while (0)
  301. 
  302. void ff_formats_unref(AVFilterFormats **ref)
       ^
  303. {
  304.     FORMATS_UNREF(ref, formats);

libavfilter/formats.c:304:5: Binary operation: ([0, +oo] - 1):unsigned32 by call to `ff_formats_unref` 
  302. void ff_formats_unref(AVFilterFormats **ref)
  303. {
  304.     FORMATS_UNREF(ref, formats);
           ^
  305. }
  306. 

void ff_formats_unref(AVFilterFormats **ref)
{
    FORMATS_UNREF(ref, formats);
}
['static int query_formats(AVFilterContext *ctx)\n{\n    AVFilterFormats  *formats;\n    enum AVPixelFormat pix_fmt;\n    int              ret;\n    if (ctx->inputs[0]) {\n        const AVPixFmtDescriptor *desc = NULL;\n        formats = NULL;\n        while ((desc = av_pix_fmt_desc_next(desc))) {\n            pix_fmt = av_pix_fmt_desc_get_id(desc);\n            if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL ||\n                  desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) &&\n                desc->nb_components && !desc->log2_chroma_h &&\n                (ret = ff_add_format(&formats, pix_fmt)) < 0) {\n                ff_formats_unref(&formats);\n                return ret;\n            }\n        }\n        ff_formats_ref(formats, &ctx->inputs[0]->out_formats);\n        ff_formats_ref(formats, &ctx->outputs[0]->in_formats);\n    }\n    return 0;\n}', 'int ff_add_format(AVFilterFormats **avff, int fmt)\n{\n    ADD_FORMAT(avff, fmt, int, formats, nb_formats);\n}', 'void ff_formats_unref(AVFilterFormats **ref)\n{\n    FORMATS_UNREF(ref, formats);\n}']