Commit 31b662b1 authored by malenov's avatar malenov
Browse files

fix warnings inside TEMP_FIX_BSPLINE_MALLOC

parent 96d8de9f
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -5018,8 +5018,10 @@ void HRTF_model_precalc(
);

void BSplineModelEvalDealloc(
    ModelParams_t *model,                                       /* i  : Model parameters                        */
    ModelEval_t *modelEval                                      /* i  : Model evaluation structure              */
    ModelParams_t *model                                       /* i  : Model parameters                        */
#ifndef TEMP_FIX_BSPLINE_MALLOC
    ,ModelEval_t *modelEval                                      /* i  : Model evaluation structure              */
#endif
);

void BSplineModelEvalITDDealloc(
+21 −1
Original line number Diff line number Diff line
@@ -1691,8 +1691,28 @@ void ivas_destroy_dec(
            BSplineModelEvalITDDealloc( &st_ivas->hHrtfTD->ModelParamsITD );
        }

        BSplineModelEvalDealloc( &st_ivas->hHrtfTD->ModelParams, &st_ivas->hHrtfTD->ModelEval );
        BSplineModelEvalDealloc( &st_ivas->hHrtfTD->ModelParams
#ifndef TEMP_FIX_BSPLINE_MALLOC
            ,&st_ivas->hHrtfTD->ModelEval 
#endif
        );

#ifdef TEMP_FIX_BSPLINE_MALLOC
        {
            ModelParams_t *model = &st_ivas->hHrtfTD->ModelParams;
            ModelEval_t *modelEval = &st_ivas->hHrtfTD->ModelEval;
            if ( !model->modelROM )
            {
                free_( model->EL_dyn );
                free_( model->ER_dyn );
            }
            if ( modelEval != NULL )
            {
                free_( modelEval->hrfModL );
                free_( modelEval->hrfModR );
            }
        }
#endif
        ivas_HRTF_binary_close( &st_ivas->hHrtfTD );
    }

+21 −1
Original line number Diff line number Diff line
@@ -210,8 +210,28 @@ ivas_error ivas_sba_dec_reinit(
            BSplineModelEvalITDDealloc( &st_ivas->hHrtfTD->ModelParamsITD );
        }

        BSplineModelEvalDealloc( &st_ivas->hHrtfTD->ModelParams, &st_ivas->hHrtfTD->ModelEval );
        BSplineModelEvalDealloc( &st_ivas->hHrtfTD->ModelParams
#ifndef TEMP_FIX_BSPLINE_MALLOC
            , &st_ivas->hHrtfTD->ModelEval
#endif        
        );

#ifdef TEMP_FIX_BSPLINE_MALLOC
        {
            ModelParams_t *model = &st_ivas->hHrtfTD->ModelParams;
            ModelEval_t *modelEval = &st_ivas->hHrtfTD->ModelEval;
            if ( !model->modelROM )
            {
                free_( model->EL_dyn );
                free_( model->ER_dyn );
            }
            if ( modelEval != NULL )
            {
                free_( modelEval->hrfModL );
                free_( modelEval->hrfModR );
            }
        }
#endif
        ivas_HRTF_binary_close( &st_ivas->hHrtfTD );
    }

+5 −1
Original line number Diff line number Diff line
@@ -134,7 +134,11 @@ void TDREND_MIX_Dealloc(
            {
                BSplineModelEvalITDDealloc( &hBinRendererTd->HrFiltSet_p->ModelParamsITD );
            }
            BSplineModelEvalDealloc( &hBinRendererTd->HrFiltSet_p->ModelParams, &hBinRendererTd->HrFiltSet_p->ModelEval );
            BSplineModelEvalDealloc( &hBinRendererTd->HrFiltSet_p->ModelParams
#ifndef TEMP_FIX_BSPLINE_MALLOC
                , &hBinRendererTd->HrFiltSet_p->ModelEval
#endif            
            );

#ifdef TEMP_FIX_BSPLINE_MALLOC
            {
+1 −2
Original line number Diff line number Diff line
@@ -313,8 +313,7 @@ static ivas_error LoadBSplineBinary(
 --------------------------------------------------------------------*/

void BSplineModelEvalDealloc(
    ModelParams_t *model,  /* i  : Model parameters           */
    ModelEval_t *modelEval /* i  : Model evaluation structure */
    ModelParams_t *model   /* i  : Model parameters           */
)
{
    /* Allocated in LoadBSplineBinary() */