From 1aadeb2206e3af874f68a0a37935d07612d355cf Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 8 Oct 2020 16:46:03 -0400 Subject: [PATCH] free the context as well. --- src/zm_ffmpeg_input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_ffmpeg_input.cpp b/src/zm_ffmpeg_input.cpp index 0ae6e634b..c07549522 100644 --- a/src/zm_ffmpeg_input.cpp +++ b/src/zm_ffmpeg_input.cpp @@ -17,7 +17,7 @@ FFmpeg_Input::~FFmpeg_Input() { if ( streams ) { for ( unsigned int i = 0; i < input_format_context->nb_streams; i += 1 ) { avcodec_close(streams[i].context); - streams[i].context = nullptr; + avcodec_free_context(&streams[i].context); } delete[] streams; streams = nullptr;