[FFmpeg-cvslog] avfilter/src_movie: Fix leak of packet upon error

Andreas Rheinhardt git at videolan.org
Fri Sep 11 00:19:09 EEST 2020


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Thu Sep 10 03:14:39 2020 +0200| [d91756c1b5fa70095e55d34ded6d6085bfd56bd4] | committer: Andreas Rheinhardt

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 at nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d91756c1b5fa70095e55d34ded6d6085bfd56bd4
---

 libavfilter/src_movie.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c
index 75ac3bfaf6..d83cb6d1e4 100644
--- a/libavfilter/src_movie.c
+++ b/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);
 }



More information about the ffmpeg-cvslog mailing list