[FFmpeg-devel] [PATCH] ffmpeg: release the last_frame before the decoders are closed

Steve Lhomme robux4 at ycbcr.xyz
Tue Oct 16 15:16:08 EEST 2018


If the decoder provides its own buffers it might not be able to release its
buffers once it has been closed. (this is the case with dav1d).
---
 fftools/ffmpeg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index da4259a9a8..faf62475a2 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -4738,6 +4738,7 @@ static int transcode(void)
         if (ost->encoding_needed) {
             av_freep(&ost->enc_ctx->stats_in);
         }
+        av_frame_unref(ost->last_frame);
         total_packets_written += ost->packets_written;
     }
 
-- 
2.17.1



More information about the ffmpeg-devel mailing list