<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">From acf2075aaf20a5dc1151e2a0da6505c9d0c3bdfc Mon Sep 17 00:00:00 2001<br>From: Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>><br>Date: Mon, 18 Nov 2024 11:03:38 +0530<br>Subject: [PATCH] Fix MCSTF double free<br><br>---<br> source/common/frame.cpp    | 1 +<br> source/encoder/encoder.cpp | 2 +-<br> 2 files changed, 2 insertions(+), 1 deletion(-)<br><br>diff --git a/source/common/frame.cpp b/source/common/frame.cpp<br>index 3a98c23d7..200717425 100644<br>--- a/source/common/frame.cpp<br>+++ b/source/common/frame.cpp<br>@@ -321,6 +321,7 @@ void Frame::destroy()<br>         }<br> <br>         delete m_mcstf->m_metld;<br>+        m_mcstf->m_metld = NULL;<br>         for (int i = 0; i < (m_mcstf->m_range << 1); i++)<br>             m_mcstf->destroyRefPicInfo(&m_mcstfRefList[i]);<br> <br>diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp<br>index e85e09d82..3003ac1ac 100644<br>--- a/source/encoder/encoder.cpp<br>+++ b/source/encoder/encoder.cpp<br>@@ -4036,7 +4036,7 @@ void Encoder::configure(x265_param *p)<br>     if (strlen(p->analysisLoad) && !p->analysisLoadReuseLevel)<br>         p->analysisLoadReuseLevel = 5;<br> <br>-    if ((strlen(p->analysisLoad) || p->analysisSave) && (p->bDistributeModeAnalysis || p->bDistributeMotionEstimation))<br>+    if ((strlen(p->analysisLoad) || strlen(p->analysisSave)) && (p->bDistributeModeAnalysis || p->bDistributeMotionEstimation))<br>     {<br>         x265_log(p, X265_LOG_WARNING, "Analysis load/save options incompatible with pmode/pme, Disabling pmode/pme\n");<br>         p->bDistributeMotionEstimation = p->bDistributeModeAnalysis = 0;<br>-- <br>2.41.0.windows.1<br><br></div></div>