diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-18 05:27:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-20 04:43:40 +0200 |
commit | a5e8ca7e73f8aa7eade5541b6ca3cee66cff7cf0 (patch) | |
tree | b3e1b4c2c6243d3ed61a3d908cf7653b8d90e666 | |
parent | c049e979b60542c53894e812d5921a455b7c16a3 (diff) | |
download | ffmpeg-a5e8ca7e73f8aa7eade5541b6ca3cee66cff7cf0.tar.gz |
ffmpeg: Free last_frame instead of just unref
Fixes Ticket4611
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d1050d9950610aa2b27878b67bb2b902dd717e7c)
Conflicts:
ffmpeg.c
-rw-r--r-- | ffmpeg.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1155,7 +1155,10 @@ static void do_video_out(AVFormatContext *s, if (!ost->last_frame) ost->last_frame = av_frame_alloc(); av_frame_unref(ost->last_frame); - av_frame_ref(ost->last_frame, next_picture); + if (next_picture) + av_frame_ref(ost->last_frame, next_picture); + else + av_frame_free(&ost->last_frame); } static double psnr(double d) |