avfilter/src_movie: Fix leak of packet upon error

If allocating the AVFrame to contain a decoded frame fails, the AVPacket
containing the data intended to be decoded leaks. This commit fixes
this.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
pull/350/head
Andreas Rheinhardt 5 years ago
parent 41e0058b48
commit d91756c1b5
  1. 1
      libavfilter/src_movie.c

@ -344,6 +344,7 @@ static av_cold void movie_uninit(AVFilterContext *ctx)
}
av_freep(&movie->st);
av_freep(&movie->out_index);
av_packet_unref(&movie->pkt);
if (movie->format_ctx)
avformat_close_input(&movie->format_ctx);
}

Loading…
Cancel
Save