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

libavfilter/af_resample.c:135:15: Call
133.             return ret;
134. 
135.         buf = ff_get_audio_buffer(outlink, AV_PERM_WRITE, nb_samples);
                   ^
136.         if (!buf)
137.             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_resample.c:143:13: Call
141.                                  NULL, 0, 0);
142.         if (ret <= 0) {
143.             avfilter_unref_buffer(buf);
                 ^
144.             return (ret == 0) ? AVERROR_EOF : ret;
145.         }

libavfilter/avfilter.c:88:1: <LHS trace>
86. }
87. 
88. void avfilter_unref_buffer(AVFilterBufferRef *ref)
    ^
89. {
90.     if (!ref)

libavfilter/avfilter.c:88:1: Parameter `ref->buf->refcount`
  86. }
  87. 
  88. void avfilter_unref_buffer(AVFilterBufferRef *ref)
      ^
  89. {
  90.     if (!ref)

libavfilter/avfilter.c:92:11: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avfilter_unref_buffer` 
  90.     if (!ref)
  91.         return;
  92.     if (!(--ref->buf->refcount))
                ^
  93.         ref->buf->free(ref->buf);
  94.     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 request_frame(AVFilterLink *outlink)\n{\n    AVFilterContext *ctx = outlink->src;\n    ResampleContext   *s = ctx->priv;\n    int ret = avfilter_request_frame(ctx->inputs[0]);\n    if (ret == AVERROR_EOF && s->avr) {\n        AVFilterBufferRef *buf;\n        int nb_samples = av_rescale_rnd(avresample_get_delay(s->avr),\n                                        outlink->sample_rate,\n                                        ctx->inputs[0]->sample_rate,\n                                        AV_ROUND_UP);\n        if (!nb_samples)\n            return ret;\n        buf = ff_get_audio_buffer(outlink, AV_PERM_WRITE, nb_samples);\n        if (!buf)\n            return AVERROR(ENOMEM);\n        ret = avresample_convert(s->avr, (void**)buf->extended_data,\n                                 buf->linesize[0], nb_samples,\n                                 NULL, 0, 0);\n        if (ret <= 0) {\n            avfilter_unref_buffer(buf);\n            return (ret == 0) ? AVERROR_EOF : ret;\n        }\n        buf->pts = s->next_pts;\n        ff_filter_samples(outlink, buf);\n        return 0;\n    }\n    return ret;\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}']