mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
41e0058b48
commit
d91756c1b5
|
@ -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…
Reference in New Issue