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

avconv.c:1807:13: Call
1805. #endif
1806. 
1807.             do_video_out(output_files[ost->file_index].ctx, ost, ist, filtered_frame, &frame_size,
                  ^
1808.                          same_quant ? quality : ost->st->codec->global_quality);
1809.             if (vstats_filename && frame_size)

avconv.c:1814:17: Call
1812.             frame_available = ost->output_video_filter && avfilter_poll_frame(ost->output_video_filter->inputs[0]);
1813.             if (ost->picref)
1814.                 avfilter_unref_buffer(ost->picref);
                      ^
1815.         }
1816. #endif

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

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

libavfilter/avfilter.c:76:11: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avfilter_unref_buffer` 
  74.     if (!ref)
  75.         return;
  76.     if (!(--ref->buf->refcount))
                ^
  77.         ref->buf->free(ref->buf);
  78.     av_free(ref->video);

void avfilter_unref_buffer(AVFilterBufferRef *ref)
{
    if (!ref)
        return;
    if (!(--ref->buf->refcount))
        ref->buf->free(ref->buf);
    av_free(ref->video);
    av_free(ref->audio);
    av_free(ref);
}
['static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_t *pkt_pts)\n{\n    AVFrame *decoded_frame, *filtered_frame = NULL;\n    void *buffer_to_free = NULL;\n    int i, ret = 0;\n    float quality;\n#if CONFIG_AVFILTER\n    int frame_available = 1;\n#endif\n    if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame()))\n        return AVERROR(ENOMEM);\n    else\n        avcodec_get_frame_defaults(ist->decoded_frame);\n    decoded_frame = ist->decoded_frame;\n    pkt->pts  = *pkt_pts;\n    pkt->dts  = ist->pts;\n    *pkt_pts  = AV_NOPTS_VALUE;\n    ret = avcodec_decode_video2(ist->st->codec,\n                                decoded_frame, got_output, pkt);\n    if (ret < 0)\n        return ret;\n    quality = same_quant ? decoded_frame->quality : 0;\n    if (!*got_output) {\n        return ret;\n    }\n    ist->next_pts = ist->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pkt_pts,\n                                                 decoded_frame->pkt_dts);\n    if (pkt->duration)\n        ist->next_pts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q);\n    else if (ist->st->codec->time_base.num != 0) {\n        int ticks      = ist->st->parser ? ist->st->parser->repeat_pict + 1 :\n                                           ist->st->codec->ticks_per_frame;\n        ist->next_pts += ((int64_t)AV_TIME_BASE *\n                          ist->st->codec->time_base.num * ticks) /\n                          ist->st->codec->time_base.den;\n    }\n    pkt->size = 0;\n    pre_process_video_frame(ist, (AVPicture *)decoded_frame, &buffer_to_free);\n    rate_emu_sleep(ist);\n    for (i = 0; i < nb_output_streams; i++) {\n        OutputStream *ost = &output_streams[i];\n        int frame_size;\n        if (!check_output_constraints(ist, ost) || !ost->encoding_needed)\n            continue;\n#if CONFIG_AVFILTER\n        if (ost->input_video_filter) {\n            AVRational sar;\n            if (ist->st->sample_aspect_ratio.num)\n                sar = ist->st->sample_aspect_ratio;\n            else\n                sar = ist->st->codec->sample_aspect_ratio;\n            av_vsrc_buffer_add_frame(ost->input_video_filter, decoded_frame, ist->pts, sar);\n            if (!ist->filtered_frame && !(ist->filtered_frame = avcodec_alloc_frame())) {\n                av_free(buffer_to_free);\n                return AVERROR(ENOMEM);\n            } else\n                avcodec_get_frame_defaults(ist->filtered_frame);\n            filtered_frame = ist->filtered_frame;\n            frame_available = avfilter_poll_frame(ost->output_video_filter->inputs[0]);\n        }\n        while (frame_available) {\n            AVRational ist_pts_tb;\n            if (ost->output_video_filter)\n                get_filtered_video_frame(ost->output_video_filter, filtered_frame, &ost->picref, &ist_pts_tb);\n            if (ost->picref)\n                ist->pts = av_rescale_q(ost->picref->pts, ist_pts_tb, AV_TIME_BASE_Q);\n            if (ost->picref->video && !ost->frame_aspect_ratio)\n                ost->st->codec->sample_aspect_ratio = ost->picref->video->pixel_aspect;\n#else\n            filtered_frame = decoded_frame;\n#endif\n            do_video_out(output_files[ost->file_index].ctx, ost, ist, filtered_frame, &frame_size,\n                         same_quant ? quality : ost->st->codec->global_quality);\n            if (vstats_filename && frame_size)\n                do_video_stats(output_files[ost->file_index].ctx, ost, frame_size);\n#if CONFIG_AVFILTER\n            frame_available = ost->output_video_filter && avfilter_poll_frame(ost->output_video_filter->inputs[0]);\n            if (ost->picref)\n                avfilter_unref_buffer(ost->picref);\n        }\n#endif\n    }\n    av_free(buffer_to_free);\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    av_free(ref->video);\n    av_free(ref->audio);\n    av_free(ref);\n}']