avconv.c:697: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `avfilter_unref_buffer`.

avconv.c:682:15: Call
680.                                          ost->st->codec->frame_size);
681.     else
682.         ret = av_buffersink_read(ost->filter->filter, &picref);
                   ^
683. 
684.     if (ret < 0)

libavfilter/buffersink.c:62:1: Parameter `ctx->priv->cur_buf`
  60. }
  61. 
  62. int av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf)
      ^
  63. {
  64.     BufferSinkContext *s    = ctx->priv;

avconv.c:687:5: Call
685.         return ret;
686. 
687.     avfilter_copy_buf_props(filtered_frame, picref);
         ^
688.     if (picref->pts != AV_NOPTS_VALUE) {
689.         filtered_frame->pts = av_rescale_q(picref->pts,

libavfilter/buffer.c:120:1: Parameter `src->type`
  118. }
  119. 
  120. int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src)
       ^
  121. {
  122.     int planes, nb_channels;

avconv.c:697:13: Call
695. 
696.         if (of->start_time && filtered_frame->pts < 0) {
697.             avfilter_unref_buffer(picref);
                 ^
698.             return 0;
699.         }

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 poll_filter(OutputStream *ost)\n{\n    OutputFile    *of = output_files[ost->file_index];\n    AVFilterBufferRef *picref;\n    AVFrame *filtered_frame = NULL;\n    int frame_size, ret;\n    if (!ost->filtered_frame && !(ost->filtered_frame = avcodec_alloc_frame())) {\n        return AVERROR(ENOMEM);\n    } else\n        avcodec_get_frame_defaults(ost->filtered_frame);\n    filtered_frame = ost->filtered_frame;\n    if (ost->enc->type == AVMEDIA_TYPE_AUDIO &&\n        !(ost->enc->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE))\n        ret = av_buffersink_read_samples(ost->filter->filter, &picref,\n                                         ost->st->codec->frame_size);\n    else\n        ret = av_buffersink_read(ost->filter->filter, &picref);\n    if (ret < 0)\n        return ret;\n    avfilter_copy_buf_props(filtered_frame, picref);\n    if (picref->pts != AV_NOPTS_VALUE) {\n        filtered_frame->pts = av_rescale_q(picref->pts,\n                                           ost->filter->filter->inputs[0]->time_base,\n                                           ost->st->codec->time_base) -\n                              av_rescale_q(of->start_time,\n                                           AV_TIME_BASE_Q,\n                                           ost->st->codec->time_base);\n        if (of->start_time && filtered_frame->pts < 0) {\n            avfilter_unref_buffer(picref);\n            return 0;\n        }\n    }\n    switch (ost->filter->filter->inputs[0]->type) {\n    case AVMEDIA_TYPE_VIDEO:\n        if (!ost->frame_aspect_ratio)\n            ost->st->codec->sample_aspect_ratio = picref->video->pixel_aspect;\n        do_video_out(of->ctx, ost, filtered_frame, &frame_size);\n        if (vstats_filename && frame_size)\n            do_video_stats(of->ctx, ost, frame_size);\n        break;\n    case AVMEDIA_TYPE_AUDIO:\n        do_audio_out(of->ctx, ost, filtered_frame);\n        break;\n    default:\n        av_assert0(0);\n    }\n    avfilter_unref_buffer(picref);\n    return 0;\n}', 'int av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf)\n{\n    BufferSinkContext *s    = ctx->priv;\n    AVFilterLink      *link = ctx->inputs[0];\n    int ret;\n    if (!buf)\n        return ff_poll_frame(ctx->inputs[0]);\n    if ((ret = ff_request_frame(link)) < 0)\n        return ret;\n    if (!s->cur_buf)\n        return AVERROR(EINVAL);\n    *buf       = s->cur_buf;\n    s->cur_buf = NULL;\n    return 0;\n}', 'int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src)\n{\n    int planes, nb_channels;\n    memcpy(dst->data, src->data, sizeof(dst->data));\n    memcpy(dst->linesize, src->linesize, sizeof(dst->linesize));\n    dst->pts     = src->pts;\n    dst->format  = src->format;\n    switch (src->type) {\n    case AVMEDIA_TYPE_VIDEO:\n        dst->width               = src->video->w;\n        dst->height              = src->video->h;\n        dst->sample_aspect_ratio = src->video->pixel_aspect;\n        dst->interlaced_frame    = src->video->interlaced;\n        dst->top_field_first     = src->video->top_field_first;\n        dst->key_frame           = src->video->key_frame;\n        dst->pict_type           = src->video->pict_type;\n        break;\n    case AVMEDIA_TYPE_AUDIO:\n        nb_channels = av_get_channel_layout_nb_channels(src->audio->channel_layout);\n        planes      = av_sample_fmt_is_planar(src->format) ? nb_channels : 1;\n        if (planes > FF_ARRAY_ELEMS(dst->data)) {\n            dst->extended_data = av_mallocz(planes * sizeof(*dst->extended_data));\n            if (!dst->extended_data)\n                return AVERROR(ENOMEM);\n            memcpy(dst->extended_data, src->extended_data,\n                   planes * sizeof(*dst->extended_data));\n        } else\n            dst->extended_data = dst->data;\n        dst->sample_rate         = src->audio->sample_rate;\n        dst->channel_layout      = src->audio->channel_layout;\n        dst->nb_samples          = src->audio->nb_samples;\n        break;\n    default:\n        return AVERROR(EINVAL);\n    }\n    return 0;\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}']