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>
This commit is contained in:
Andreas Rheinhardt 2020-09-10 03:14:39 +02:00
parent 41e0058b48
commit d91756c1b5
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}