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

libavfilter/vsrc_movie.c:193:9: Call
191.     av_free(movie->format_name);
192.     if (movie->codec_ctx)
193.         avcodec_close(movie->codec_ctx);
             ^
194.     if (movie->format_ctx)
195.         avformat_close_input(&movie->format_ctx);

libavcodec/utils.c:1282:9: Call
  1280.         if (avctx->codec && avctx->codec->close)
  1281.             avctx->codec->close(avctx);
  1282.         avcodec_default_free_buffers(avctx);
                ^
  1283.         avctx->coded_frame = NULL;
  1284.         av_freep(&avctx->internal);

libavcodec/utils.c:1598:9: Call
    1596.         break;
    1597.     case AVMEDIA_TYPE_AUDIO:
    1598.         audio_free_buffers(avctx);
                  ^
    1599.         break;
    1600.     default:

libavfilter/vsrc_movie.c:195:9: Call
193.         avcodec_close(movie->codec_ctx);
194.     if (movie->format_ctx)
195.         avformat_close_input(&movie->format_ctx);
             ^
196.     avfilter_unref_buffer(movie->picref);
197.     av_freep(&movie->frame);

libavformat/utils.c:2595:1: Parameter `(*ps)->nb_programs`
  2593. #endif
  2594. 
  2595. void avformat_close_input(AVFormatContext **ps)
        ^
  2596. {
  2597.     AVFormatContext *s = *ps;

libavformat/utils.c:2603:5: Call
  2601.     if (s->iformat->read_close)
  2602.         s->iformat->read_close(s);
  2603.     avformat_free_context(s);
            ^
  2604.     *ps = NULL;
  2605.     if (pb)

libavformat/utils.c:2546:1: <LHS trace>
2544. }
2545. 
2546. void avformat_free_context(AVFormatContext *s)
      ^
2547. {
2548.     int i;

libavformat/utils.c:2546:1: Parameter `s->nb_programs`
    2544. }
    2545. 
    2546. void avformat_free_context(AVFormatContext *s)
          ^
    2547. {
    2548.     int i;

libavformat/utils.c:2571:9: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avformat_close_input` 
    2569.         av_free(st);
    2570.     }
    2571.     for(i=s->nb_programs-1; i>=0; i--) {
                  ^
    2572.         av_dict_free(&s->programs[i]->metadata);
    2573.         av_freep(&s->programs[i]->stream_index);

void avformat_free_context(AVFormatContext *s)
{
    int i;
    AVStream *st;
    av_opt_free(s);
    if (s->iformat && s->iformat->priv_class && s->priv_data)
        av_opt_free(s->priv_data);
    for(i=0;i<s->nb_streams;i++) {
        st = s->streams[i];
        if (st->parser) {
            av_parser_close(st->parser);
            av_free_packet(&st->cur_pkt);
        }
        av_dict_free(&st->metadata);
        av_free(st->index_entries);
        av_free(st->codec->extradata);
        av_free(st->codec->subtitle_header);
        av_free(st->codec);
        av_free(st->priv_data);
        av_free(st->info);
        av_free(st);
    }
    for(i=s->nb_programs-1; i>=0; i--) {
        av_dict_free(&s->programs[i]->metadata);
        av_freep(&s->programs[i]->stream_index);
        av_freep(&s->programs[i]);
    }
    av_freep(&s->programs);
    av_freep(&s->priv_data);
    while(s->nb_chapters--) {
        av_dict_free(&s->chapters[s->nb_chapters]->metadata);
        av_free(s->chapters[s->nb_chapters]);
    }
    av_freep(&s->chapters);
    av_dict_free(&s->metadata);
    av_freep(&s->streams);
    av_free(s);
}
['static av_cold void uninit(AVFilterContext *ctx)\n{\n    MovieContext *movie = ctx->priv;\n    av_free(movie->file_name);\n    av_free(movie->format_name);\n    if (movie->codec_ctx)\n        avcodec_close(movie->codec_ctx);\n    if (movie->format_ctx)\n        avformat_close_input(&movie->format_ctx);\n    avfilter_unref_buffer(movie->picref);\n    av_freep(&movie->frame);\n}', 'int avcodec_close(AVCodecContext *avctx)\n{\n    if (ff_lockmgr_cb) {\n        if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN))\n            return -1;\n    }\n    entangled_thread_counter++;\n    if(entangled_thread_counter != 1){\n        av_log(avctx, AV_LOG_ERROR, "insufficient thread locking around avcodec_open/close()\\n");\n        entangled_thread_counter--;\n        return -1;\n    }\n    if (avcodec_is_open(avctx)) {\n        if (HAVE_THREADS && avctx->thread_opaque)\n            ff_thread_free(avctx);\n        if (avctx->codec && avctx->codec->close)\n            avctx->codec->close(avctx);\n        avcodec_default_free_buffers(avctx);\n        avctx->coded_frame = NULL;\n        av_freep(&avctx->internal);\n    }\n    if (avctx->priv_data && avctx->codec && avctx->codec->priv_class)\n        av_opt_free(avctx->priv_data);\n    av_opt_free(avctx);\n    av_freep(&avctx->priv_data);\n    if (codec_is_encoder(avctx->codec))\n        av_freep(&avctx->extradata);\n    avctx->codec = NULL;\n    avctx->active_thread_type = 0;\n    entangled_thread_counter--;\n    if (ff_lockmgr_cb) {\n        (*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_RELEASE);\n    }\n    return 0;\n}', 'void avcodec_default_free_buffers(AVCodecContext *avctx)\n{\n    switch (avctx->codec_type) {\n    case AVMEDIA_TYPE_VIDEO:\n        video_free_buffers(avctx);\n        break;\n    case AVMEDIA_TYPE_AUDIO:\n        audio_free_buffers(avctx);\n        break;\n    default:\n        break;\n    }\n}', 'void avformat_close_input(AVFormatContext **ps)\n{\n    AVFormatContext *s = *ps;\n    AVIOContext *pb = (s->iformat->flags & AVFMT_NOFILE) || (s->flags & AVFMT_FLAG_CUSTOM_IO) ?\n                       NULL : s->pb;\n    flush_packet_queue(s);\n    if (s->iformat->read_close)\n        s->iformat->read_close(s);\n    avformat_free_context(s);\n    *ps = NULL;\n    if (pb)\n        avio_close(pb);\n}', 'void avformat_free_context(AVFormatContext *s)\n{\n    int i;\n    AVStream *st;\n    av_opt_free(s);\n    if (s->iformat && s->iformat->priv_class && s->priv_data)\n        av_opt_free(s->priv_data);\n    for(i=0;i<s->nb_streams;i++) {\n        st = s->streams[i];\n        if (st->parser) {\n            av_parser_close(st->parser);\n            av_free_packet(&st->cur_pkt);\n        }\n        av_dict_free(&st->metadata);\n        av_free(st->index_entries);\n        av_free(st->codec->extradata);\n        av_free(st->codec->subtitle_header);\n        av_free(st->codec);\n        av_free(st->priv_data);\n        av_free(st->info);\n        av_free(st);\n    }\n    for(i=s->nb_programs-1; i>=0; i--) {\n        av_dict_free(&s->programs[i]->metadata);\n        av_freep(&s->programs[i]->stream_index);\n        av_freep(&s->programs[i]);\n    }\n    av_freep(&s->programs);\n    av_freep(&s->priv_data);\n    while(s->nb_chapters--) {\n        av_dict_free(&s->chapters[s->nb_chapters]->metadata);\n        av_free(s->chapters[s->nb_chapters]);\n    }\n    av_freep(&s->chapters);\n    av_dict_free(&s->metadata);\n    av_freep(&s->streams);\n    av_free(s);\n}']