[x265] [PATCH 1 of 2] fix weight memory free bug on I400

Min Chen chenm003 at 163.com
Mon Dec 28 23:36:31 CET 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1451340412 21600
# Node ID f8daf6c38fec27b8b01f3a01df19c5a2252382b9
# Parent  1471e4e433ccccf71f39a6eb93507c349fb8539e
fix weight memory free bug on I400
---
 source/encoder/reference.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 1471e4e433cc -r f8daf6c38fec source/encoder/reference.cpp
--- a/source/encoder/reference.cpp	Tue Dec 22 19:25:58 2015 +0530
+++ b/source/encoder/reference.cpp	Mon Dec 28 16:06:52 2015 -0600
@@ -40,9 +40,9 @@
 
 MotionReference::~MotionReference()
 {
-    X265_FREE(weightBuffer[0]);
-    X265_FREE(weightBuffer[1]);
-    X265_FREE(weightBuffer[2]);
+    if (weightBuffer[0]) X265_FREE_ZERO(weightBuffer[0]);
+    if (weightBuffer[1]) X265_FREE_ZERO(weightBuffer[1]);
+    if (weightBuffer[2]) X265_FREE_ZERO(weightBuffer[2]);
 }
 
 int MotionReference::init(PicYuv* recPic, WeightParam *wp, const x265_param& p)



More information about the x265-devel mailing list