Hi all, Just a friendly ping on this patch. Is there any feedback or anything I can do to help get it reviewed?
Thanks > 2025年6月11日 09:55,yuygfgg <leoyuyg...@gmail.com> 写道: > > In Encoder::fetchStats, the size check for the stats buffer was > incorrectly using sizeof(stats) on the x265_stats pointer. This > evaluates to the size of a pointer, not the size of the structure > it points to. > > This commit changes the check to sizeof(*stats) to correctly > compare against the size of the x265_stats structure. > > Signed-off-by: yuygfgg <leoyuyg...@gmail.com> > --- > source/encoder/encoder.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp > index cf2e95988..be898cbbf 100644 > --- a/source/encoder/encoder.cpp > +++ b/source/encoder/encoder.cpp > @@ -2963,7 +2963,7 @@ void Encoder::printSummary() > > void Encoder::fetchStats(x265_stats *stats, size_t statsSizeBytes, int layer) > { > - if (statsSizeBytes >= sizeof(stats)) > + if (statsSizeBytes >= sizeof(*stats)) > { > stats->globalPsnrY = m_analyzeAll[layer].m_psnrSumY; > stats->globalPsnrU = m_analyzeAll[layer].m_psnrSumU; > -- > 2.49.0 >
_______________________________________________ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel