From 3d57484757b3955012ff8d86c253e44aed7ec1ad Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Fri, 2 Aug 2024 09:20:24 +0000 Subject: [PATCH] H264Libav: Clean up sws context This fixes a memory leak (cherry picked from commit 35966469bc3410ba1573126300a19bf47d370910) --- common/rfb/H264LibavDecoderContext.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/common/rfb/H264LibavDecoderContext.cxx b/common/rfb/H264LibavDecoderContext.cxx index f7ec4832..f1599f4c 100644 --- a/common/rfb/H264LibavDecoderContext.cxx +++ b/common/rfb/H264LibavDecoderContext.cxx @@ -99,6 +99,7 @@ void H264LibavDecoderContext::freeCodec() { avcodec_free_context(&avctx); av_frame_free(&rgbFrame); av_frame_free(&frame); + sws_freeContext(sws); free(h264WorkBuffer); initialized = false; } -- 2.39.5