Commit 646d5a17 authored by emerit's avatar emerit
Browse files

fix sanitizer tests

parent a6dd08ff
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -790,11 +790,10 @@ cleanup:
    if ( arg.hrtfReaderEnabled )
    {
#ifdef FIX_CREND_SIMPLIFY_CODE
        IVAS_DEC_GetHrtfTDrendHandle( hIvasDec, &hHrtfBinary.hHrtfTD );
        destroy_td_hrtf( hHrtfBinary.hHrtfTD );
        if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
        IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfBinary.hHrtfStatistics );
        destroy_hrtf_statistics( hHrtfBinary.hHrtfStatistics );
        }
#else
        IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD );
        if ( hHrtfTD != NULL )
@@ -817,10 +816,7 @@ cleanup:
     * value as not handled. This is needed as HRTF statistics from ROM are currently converted from float values. */
#ifdef FIX_CREND_SIMPLIFY_CODE
    IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfBinary.hHrtfStatistics );
    if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
    {
    destroy_hrtf_statistics( hHrtfBinary.hHrtfStatistics );
    }
#else
    IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics );
    destroy_hrtf_statistics( hHrtfStatistics );
+1 −4
Original line number Diff line number Diff line
@@ -2178,10 +2178,7 @@ cleanup:
        destroy_td_hrtf( hHrtfTD );
    }
#endif
    if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
    {
    destroy_hrtf_statistics( hHrtfStatistics );
    }
    IVAS_REND_Close( &hIvasRend );
    IsmPositionProvider_close( positionProvider );
    RenderConfigReader_close( &renderConfigReader );
+7 −0
Original line number Diff line number Diff line
@@ -341,6 +341,13 @@ ivas_error ivas_HRTF_statistics_binary_open_fx(
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for statistics HRTF tables!" );
    }

#ifdef FIX_CREND_SIMPLIFY_CODE
    ( *hHrtfStatistics )->average_energy_l_dyn = NULL;
    ( *hHrtfStatistics )->average_energy_r_dyn = NULL;
    ( *hHrtfStatistics )->inter_aural_coherence_dyn = NULL;
    ( *hHrtfStatistics )->fromROM = 1;
#endif

    return IVAS_ERR_OK;
}