Moving that declaration to following location shouldn't have any side-effects. We are just bringing the declaration closer to its usage to avoid accessing uninitialized memory:
@@ -4075,6 +4074,7 @@ void CostEstimateGroup::processTasks(int workerThreadID) if (m_lookahead.m_param->bEnableTemporalFilter && curFrame && (curFrame->m_lowres.sliceType == X265_TYPE_IDR || curFrame->m_lowres.sliceType == X265_TYPE_I || curFrame->m_lowres.sliceType == X265_TYPE_P)) { + MotionEstimatorTLD& m_metld = m_lookahead.m_metld[id]; Would someone be able to commit it for me? On Mon, Jun 23, 2025 at 3:37 PM Pranav Kant <p...@google.com> wrote: > Hi, > > We noticed that one of our internal tests fails when trying to access > uninitialized memory. > > In source/encoder/slicetype.cpp, processTasks() accesses > `m_lookahead.m_metld` which is only initialized in the constructor when > `m_param->bEnableTemporalFilter` is true. This can lead to a crash when > calling processTasks with bEnableTemporalFilter = false. > > It seems just moving the declaration closer to the use in that function > should be sufficient? > > Thanks. > > >
_______________________________________________ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel