From cecb8f65b70f6363f71d6b73a6ff1fda56226ac8 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 8 Jun 2022 23:27:51 -0400 Subject: [PATCH] Try out close_input instead of free_context --- src/zm_camera.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/zm_camera.cpp b/src/zm_camera.cpp index a73961ed9..8d31f8e82 100644 --- a/src/zm_camera.cpp +++ b/src/zm_camera.cpp @@ -72,7 +72,9 @@ Camera::Camera( Camera::~Camera() { if ( mFormatContext ) { // Should also free streams - avformat_free_context(mFormatContext); + Debug(1, "Freeing mFormatContext"); + //avformat_free_context(mFormatContext); + avformat_close_input(&mFormatContext); } if ( mSecondFormatContext ) { // Should also free streams