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

libavfilter/af_amix.c:290:14: Call
288.         return AVERROR(ENOMEM);
289. 
290.     in_buf = ff_get_audio_buffer(outlink, AV_PERM_WRITE, nb_samples);
                  ^
291.     if (!in_buf)
292.         return AVERROR(ENOMEM);

libavfilter/audio.c:68:15: Unknown value from: non-const function
  66. 
  67.     if (link->dstpad->get_audio_buffer)
  68.         ret = link->dstpad->get_audio_buffer(link, perms, nb_samples);
                    ^
  69. 
  70.     if (!ret)

libavfilter/af_amix.c:303:5: Call
301.         }
302.     }
303.     avfilter_unref_buffer(in_buf);
         ^
304. 
305.     out_buf->pts = s->next_pts;

libavfilter/buffer.c:74:1: <LHS trace>
72. }
73. 
74. void avfilter_unref_buffer(AVFilterBufferRef *ref)
    ^
75. {
76.     if (!ref)

libavfilter/buffer.c:74:1: Parameter `ref->buf->refcount`
  72. }
  73. 
  74. void avfilter_unref_buffer(AVFilterBufferRef *ref)
      ^
  75. {
  76.     if (!ref)

libavfilter/buffer.c:78:11: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avfilter_unref_buffer` 
  76.     if (!ref)
  77.         return;
  78.     if (!(--ref->buf->refcount))
                ^
  79.         ref->buf->free(ref->buf);
  80.     if (ref->extended_data != ref->data)

void avfilter_unref_buffer(AVFilterBufferRef *ref)
{
    if (!ref)
        return;
    if (!(--ref->buf->refcount))
        ref->buf->free(ref->buf);
    if (ref->extended_data != ref->data)
        av_freep(&ref->extended_data);
    av_free(ref->video);
    av_free(ref->audio);
    av_free(ref);
}
['static int output_frame(AVFilterLink *outlink, int nb_samples)\n{\n    AVFilterContext *ctx = outlink->src;\n    MixContext      *s = ctx->priv;\n    AVFilterBufferRef *out_buf, *in_buf;\n    int i;\n    calculate_scales(s, nb_samples);\n    out_buf = ff_get_audio_buffer(outlink, AV_PERM_WRITE, nb_samples);\n    if (!out_buf)\n        return AVERROR(ENOMEM);\n    in_buf = ff_get_audio_buffer(outlink, AV_PERM_WRITE, nb_samples);\n    if (!in_buf)\n        return AVERROR(ENOMEM);\n    for (i = 0; i < s->nb_inputs; i++) {\n        if (s->input_state[i] == INPUT_ON) {\n            av_audio_fifo_read(s->fifos[i], (void **)in_buf->extended_data,\n                               nb_samples);\n            vector_fmac_scalar((float *)out_buf->extended_data[0],\n                               (float *) in_buf->extended_data[0],\n                               s->input_scale[i], nb_samples * s->nb_channels);\n        }\n    }\n    avfilter_unref_buffer(in_buf);\n    out_buf->pts = s->next_pts;\n    if (s->next_pts != AV_NOPTS_VALUE)\n        s->next_pts += nb_samples;\n    ff_filter_samples(outlink, out_buf);\n    return 0;\n}', 'AVFilterBufferRef *ff_get_audio_buffer(AVFilterLink *link, int perms,\n                                       int nb_samples)\n{\n    AVFilterBufferRef *ret = NULL;\n    if (link->dstpad->get_audio_buffer)\n        ret = link->dstpad->get_audio_buffer(link, perms, nb_samples);\n    if (!ret)\n        ret = ff_default_get_audio_buffer(link, perms, nb_samples);\n    if (ret)\n        ret->type = AVMEDIA_TYPE_AUDIO;\n    return ret;\n}', 'void avfilter_unref_buffer(AVFilterBufferRef *ref)\n{\n    if (!ref)\n        return;\n    if (!(--ref->buf->refcount))\n        ref->buf->free(ref->buf);\n    if (ref->extended_data != ref->data)\n        av_freep(&ref->extended_data);\n    av_free(ref->video);\n    av_free(ref->audio);\n    av_free(ref);\n}']