libavformat/mux.c:215: error: Integer Overflow L2
  ([1, 32] - [0, 31]):unsigned64 by call to `av_get_codec_tag_string`.

libavformat/mux.c:215:21: Call
213.                 if (!validate_codec_tag(s, st)) {
214.                     char tagbuf[32];
215.                     av_get_codec_tag_string(tagbuf, sizeof(tagbuf), codec->codec_tag);
                         ^
216.                     av_log(s, AV_LOG_ERROR,
217.                            "Tag %s/0x%08x incompatible with output codec id '%d'\n",

libavcodec/utils.c:1561:1: <LHS trace>
1559. }
1560. 
1561. size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
      ^
1562. {
1563.     int i, len, ret = 0;

libavcodec/utils.c:1561:1: Parameter `buf_size`
  1559. }
  1560. 
  1561. size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
        ^
  1562. {
  1563.     int i, len, ret = 0;

libavcodec/utils.c:1561:1: <RHS trace>
1559. }
1560. 
1561. size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
      ^
1562. {
1563.     int i, len, ret = 0;

libavcodec/utils.c:1561:1: Parameter `buf_size`
  1559. }
  1560. 
  1561. size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
        ^
  1562. {
  1563.     int i, len, ret = 0;

libavcodec/utils.c:1569:23: Binary operation: ([1, 32] - [0, 31]):unsigned64 by call to `av_get_codec_tag_string` 
  1567.                        isprint(codec_tag & 0xFF) ? "%c" : "[%d]", codec_tag & 0xFF);
  1568.         buf        += len;
  1569.         buf_size    = buf_size > len ? buf_size - len : 0;
                              ^
  1570.         ret        += len;
  1571.         codec_tag >>= 8;

size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
{
    int i, len, ret = 0;
    for (i = 0; i < 4; i++) {
        len = snprintf(buf, buf_size,
                       isprint(codec_tag & 0xFF) ? "%c" : "[%d]", codec_tag & 0xFF);
        buf        += len;
        buf_size    = buf_size > len ? buf_size - len : 0;
        ret        += len;
        codec_tag >>= 8;
    }
    return ret;
}
['static int init_muxer(AVFormatContext *s, AVDictionary **options)\n{\n    int ret = 0, i;\n    AVStream *st;\n    AVDictionary *tmp = NULL;\n    AVCodecContext *codec = NULL;\n    AVOutputFormat *of = s->oformat;\n    if (options)\n        av_dict_copy(&tmp, *options, 0);\n    if ((ret = av_opt_set_dict(s, &tmp)) < 0)\n        goto fail;\n    if (s->nb_streams == 0 && !(of->flags & AVFMT_NOSTREAMS)) {\n        av_log(s, AV_LOG_ERROR, "no streams\\n");\n        ret = AVERROR(EINVAL);\n        goto fail;\n    }\n    for (i = 0; i < s->nb_streams; i++) {\n        st    = s->streams[i];\n        codec = st->codec;\n        switch (codec->codec_type) {\n        case AVMEDIA_TYPE_AUDIO:\n            if (codec->sample_rate <= 0) {\n                av_log(s, AV_LOG_ERROR, "sample rate not set\\n");\n                ret = AVERROR(EINVAL);\n                goto fail;\n            }\n            if (!codec->block_align)\n                codec->block_align = codec->channels *\n                                     av_get_bits_per_sample(codec->codec_id) >> 3;\n            break;\n        case AVMEDIA_TYPE_VIDEO:\n            if (codec->time_base.num <= 0 ||\n                codec->time_base.den <= 0) {\n                av_log(s, AV_LOG_ERROR, "time base not set\\n");\n                ret = AVERROR(EINVAL);\n                goto fail;\n            }\n            if ((codec->width <= 0 || codec->height <= 0) &&\n                !(of->flags & AVFMT_NODIMENSIONS)) {\n                av_log(s, AV_LOG_ERROR, "dimensions not set\\n");\n                ret = AVERROR(EINVAL);\n                goto fail;\n            }\n            if (av_cmp_q(st->sample_aspect_ratio,\n                         codec->sample_aspect_ratio)) {\n                av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between muxer "\n                                        "(%d/%d) and encoder layer (%d/%d)\\n",\n                       st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,\n                       codec->sample_aspect_ratio.num,\n                       codec->sample_aspect_ratio.den);\n                ret = AVERROR(EINVAL);\n                goto fail;\n            }\n            break;\n        }\n        if (of->codec_tag) {\n            if (codec->codec_tag &&\n                codec->codec_id == AV_CODEC_ID_RAWVIDEO &&\n                !av_codec_get_tag(of->codec_tag, codec->codec_id) &&\n                !validate_codec_tag(s, st)) {\n                codec->codec_tag = 0;\n            }\n            if (codec->codec_tag) {\n                if (!validate_codec_tag(s, st)) {\n                    char tagbuf[32];\n                    av_get_codec_tag_string(tagbuf, sizeof(tagbuf), codec->codec_tag);\n                    av_log(s, AV_LOG_ERROR,\n                           "Tag %s/0x%08x incompatible with output codec id \'%d\'\\n",\n                           tagbuf, codec->codec_tag, codec->codec_id);\n                    ret = AVERROR_INVALIDDATA;\n                    goto fail;\n                }\n            } else\n                codec->codec_tag = av_codec_get_tag(of->codec_tag, codec->codec_id);\n        }\n        if (of->flags & AVFMT_GLOBALHEADER &&\n            !(codec->flags & CODEC_FLAG_GLOBAL_HEADER))\n            av_log(s, AV_LOG_WARNING,\n                   "Codec for stream %d does not use global headers "\n                   "but container format requires global headers\\n", i);\n    }\n    if (!s->priv_data && of->priv_data_size > 0) {\n        s->priv_data = av_mallocz(of->priv_data_size);\n        if (!s->priv_data) {\n            ret = AVERROR(ENOMEM);\n            goto fail;\n        }\n        if (of->priv_class) {\n            *(const AVClass **)s->priv_data = of->priv_class;\n            av_opt_set_defaults(s->priv_data);\n            if ((ret = av_opt_set_dict(s->priv_data, &tmp)) < 0)\n                goto fail;\n        }\n    }\n    if (s->nb_streams && !(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT)) {\n        av_dict_set(&s->metadata, "encoder", LIBAVFORMAT_IDENT, 0);\n    }\n    if (options) {\n         av_dict_free(options);\n         *options = tmp;\n    }\n    return 0;\nfail:\n    av_dict_free(&tmp);\n    return ret;\n}', 'size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)\n{\n    int i, len, ret = 0;\n    for (i = 0; i < 4; i++) {\n        len = snprintf(buf, buf_size,\n                       isprint(codec_tag & 0xFF) ? "%c" : "[%d]", codec_tag & 0xFF);\n        buf        += len;\n        buf_size    = buf_size > len ? buf_size - len : 0;\n        ret        += len;\n        codec_tag >>= 8;\n    }\n    return ret;\n}']