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

libavfilter/af_asyncts.c:137:9: Assignment
135.         avresample_convert(s->avr, (void**)buf->extended_data, buf->linesize[0],
136.                            nb_samples, NULL, 0, 0);
137.         buf->pts = s->pts;
             ^
138.         return ff_filter_samples(link, buf);
139.     }

libavfilter/af_asyncts.c:138:16: Call
136.                            nb_samples, NULL, 0, 0);
137.         buf->pts = s->pts;
138.         return ff_filter_samples(link, buf);
                    ^
139.     }
140. 

libavfilter/audio.c:155:1: Parameter `samplesref->buf->refcount`
  153. }
  154. 
  155. int ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref)
       ^
  156. {
  157.     int (*filter_samples)(AVFilterLink *, AVFilterBufferRef *);

libavfilter/audio.c:176:13: Call
  174.                                               samplesref->audio->nb_samples);
  175.         if (!buf_out) {
  176.             avfilter_unref_buffer(samplesref);
                   ^
  177.             return AVERROR(ENOMEM);
  178.         }

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 `ff_filter_samples` 
    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 request_frame(AVFilterLink *link)\n{\n    AVFilterContext *ctx = link->src;\n    ASyncContext      *s = ctx->priv;\n    int ret = 0;\n    int nb_samples;\n    s->got_output = 0;\n    while (ret >= 0 && !s->got_output)\n        ret = ff_request_frame(ctx->inputs[0]);\n    if (ret == AVERROR_EOF && (nb_samples = avresample_get_delay(s->avr))) {\n        AVFilterBufferRef *buf = ff_get_audio_buffer(link, AV_PERM_WRITE,\n                                                     nb_samples);\n        if (!buf)\n            return AVERROR(ENOMEM);\n        avresample_convert(s->avr, (void**)buf->extended_data, buf->linesize[0],\n                           nb_samples, NULL, 0, 0);\n        buf->pts = s->pts;\n        return ff_filter_samples(link, buf);\n    }\n    return ret;\n}', 'int ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref)\n{\n    int (*filter_samples)(AVFilterLink *, AVFilterBufferRef *);\n    AVFilterPad *dst = link->dstpad;\n    AVFilterBufferRef *buf_out;\n    FF_DPRINTF_START(NULL, filter_samples); ff_dlog_link(NULL, link, 1);\n    if (!(filter_samples = dst->filter_samples))\n        filter_samples = default_filter_samples;\n    if ((dst->min_perms & samplesref->perms) != dst->min_perms ||\n        dst->rej_perms & samplesref->perms) {\n        av_log(link->dst, AV_LOG_DEBUG,\n               "Copying audio data in avfilter (have perms %x, need %x, reject %x)\\n",\n               samplesref->perms, link->dstpad->min_perms, link->dstpad->rej_perms);\n        buf_out = ff_default_get_audio_buffer(link, dst->min_perms,\n                                              samplesref->audio->nb_samples);\n        if (!buf_out) {\n            avfilter_unref_buffer(samplesref);\n            return AVERROR(ENOMEM);\n        }\n        buf_out->pts                = samplesref->pts;\n        buf_out->audio->sample_rate = samplesref->audio->sample_rate;\n        av_samples_copy(buf_out->extended_data, samplesref->extended_data,\n                        0, 0, samplesref->audio->nb_samples,\n                        av_get_channel_layout_nb_channels(link->channel_layout),\n                        link->format);\n        avfilter_unref_buffer(samplesref);\n    } else\n        buf_out = samplesref;\n    return filter_samples(link, buf_out);\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}']