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

libavfilter/af_amix.c:287:14: Call
285.         return AVERROR(ENOMEM);
286. 
287.     in_buf = ff_get_audio_buffer(outlink, AV_PERM_WRITE, nb_samples);
                  ^
288.     if (!in_buf) {
289.         avfilter_unref_buffer(out_buf);

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

libavfilter/af_amix.c:289:9: Call
287.     in_buf = ff_get_audio_buffer(outlink, AV_PERM_WRITE, nb_samples);
288.     if (!in_buf) {
289.         avfilter_unref_buffer(out_buf);
             ^
290.         return AVERROR(ENOMEM);
291.     }

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

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

libavfilter/buffer.c:79:11: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avfilter_unref_buffer` 
  77.     if (!ref)
  78.         return;
  79.     if (!(--ref->buf->refcount))
                ^
  80.         ref->buf->free(ref->buf);
  81.     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        avfilter_unref_buffer(out_buf);\n        return AVERROR(ENOMEM);\n    }\n    for (i = 0; i < s->nb_inputs; i++) {\n        if (s->input_state[i] == INPUT_ON) {\n            int planes, plane_size, p;\n            av_audio_fifo_read(s->fifos[i], (void **)in_buf->extended_data,\n                               nb_samples);\n            planes     = s->planar ? s->nb_channels : 1;\n            plane_size = nb_samples * (s->planar ? 1 : s->nb_channels);\n            plane_size = FFALIGN(plane_size, 16);\n            for (p = 0; p < planes; p++) {\n                s->fdsp.vector_fmac_scalar((float *)out_buf->extended_data[p],\n                                           (float *) in_buf->extended_data[p],\n                                           s->input_scale[i], plane_size);\n            }\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    return ff_filter_samples(outlink, out_buf);\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}']