[x265] [PATCH] encoder: initialize analysis data to null

Steve Borho steve at borho.org
Mon Jan 5 15:24:41 CET 2015


On 01/05, gopu at multicorewareinc.com wrote:
> # 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

queued

> 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);
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel

-- 
Steve Borho


More information about the x265-devel mailing list