[x265] [PATCH] encoder: initialize analysis data to null
gopu at multicorewareinc.com
gopu at multicorewareinc.com
Mon Jan 5 07:55:48 CET 2015
# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1420440937 -19800
# Mon Jan 05 12:25:37 2015 +0530
# Node ID b8a49b6434c5e9da7f301b388044df33083adb64
# Parent f255e8d06423231cb8c58ab5d3b10de7fb27b424
encoder: initialize analysis data to null
diff -r f255e8d06423 -r b8a49b6434c5 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Fri Jan 02 18:22:38 2015 +0530
+++ b/source/encoder/encoder.cpp Mon Jan 05 12:25:37 2015 +0530
@@ -1558,6 +1558,7 @@
void Encoder::allocAnalysis(x265_analysis_data* analysis)
{
+ analysis->interData = analysis->intraData = NULL;
if (analysis->sliceType == X265_TYPE_IDR || analysis->sliceType == X265_TYPE_I)
{
analysis_intra_data *intraData = (analysis_intra_data*)analysis->intraData;
@@ -1582,7 +1583,7 @@
void Encoder::freeAnalysis(x265_analysis_data* analysis)
{
- if (analysis->sliceType == X265_TYPE_IDR || analysis->sliceType == X265_TYPE_I)
+ if (analysis->intraData)
{
X265_FREE(((analysis_intra_data*)analysis->intraData)->depth);
X265_FREE(((analysis_intra_data*)analysis->intraData)->modes);
More information about the x265-devel
mailing list