Commit 7780578f authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for renderer pytest crash issue.

vbap freeing issue fixed with these changes.
parent 51af04eb
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -584,13 +584,21 @@ static ivas_error ivas_dirac_rend_config(
    {
        if ( flag_config == DIRAC_RECONFIGURE && st_ivas->hVBAPdata != NULL )
        {
#ifdef IVAS_FLOAT_FIXED
            vbap_free_data_fx(&(st_ivas->hVBAPdata));
#else
            vbap_free_data( &( st_ivas->hVBAPdata ) );
#endif
        }
        hDirACRend->hoa_decoder = NULL;
    }
    else if ( flag_config == DIRAC_RECONFIGURE && st_ivas->hVBAPdata != NULL )
    {
#ifdef IVAS_FLOAT_FIXED
        vbap_free_data_fx(&(st_ivas->hVBAPdata));
#else
        vbap_free_data( &( st_ivas->hVBAPdata ) );
#endif
    }

    /* HOA panning/dec */
+4 −0
Original line number Diff line number Diff line
@@ -2438,7 +2438,11 @@ void ivas_destroy_dec(
    efap_free_data( &st_ivas->hEFAPdata );

    /* VBAP handle */
#ifdef IVAS_FLOAT_FIXED
    vbap_free_data_fx(&(st_ivas->hVBAPdata));
#else
    vbap_free_data( &( st_ivas->hVBAPdata ) );
#endif

    /* Fastconv binaural renderer handle */
    ivas_binRenderer_close( &st_ivas->hBinRenderer );
+12 −2
Original line number Diff line number Diff line
@@ -1059,7 +1059,11 @@ static ivas_error ivas_mc_dec_reconfig(
                ivas_dirac_rend_close( &( st_ivas->hDirACRend ) );
                ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
                ivas_dirac_dec_close( &( st_ivas->hDirAC ) );
#ifdef IVAS_FLOAT_FIXED
                vbap_free_data_fx(&(st_ivas->hVBAPdata));
#else
                vbap_free_data( &( st_ivas->hVBAPdata ) );
#endif
            }

            /* init LS conversion if the renderer type asks for it */
@@ -1169,8 +1173,11 @@ static ivas_error ivas_mc_dec_reconfig(
            ivas_dirac_rend_close( &( st_ivas->hDirACRend ) );
            ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
            ivas_dirac_dec_close( &( st_ivas->hDirAC ) );

#ifdef IVAS_FLOAT_FIXED
            vbap_free_data_fx(&(st_ivas->hVBAPdata));
#else
            vbap_free_data( &( st_ivas->hVBAPdata ) );
#endif
        }

        if ( last_mc_mode == MC_MODE_MCT )
@@ -1433,8 +1440,11 @@ static ivas_error ivas_mc_dec_reconfig(
            ivas_dirac_rend_close( &( st_ivas->hDirACRend ) );
            ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
            ivas_dirac_dec_close( &( st_ivas->hDirAC ) );

#ifdef IVAS_FLOAT_FIXED
            vbap_free_data_fx(&(st_ivas->hVBAPdata));
#else
            vbap_free_data( &( st_ivas->hVBAPdata ) );
#endif
        }
    }

+4 −0
Original line number Diff line number Diff line
@@ -460,7 +460,11 @@ ivas_error ivas_sba_dec_reconfigure(
        ivas_dirac_rend_close( &( st_ivas->hDirACRend ) );
        ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
        ivas_dirac_dec_close( &( st_ivas->hDirAC ) );
#ifdef IVAS_FLOAT_FIXED
        vbap_free_data_fx(&(st_ivas->hVBAPdata));
#else
        vbap_free_data( &( st_ivas->hVBAPdata ) );
#endif
    }

    if ( st_ivas->hDirAC != NULL )
+4 −26
Original line number Diff line number Diff line
@@ -578,7 +578,11 @@ ivas_error vbap_init_data_fx(
    }
    ELSE
    {
#ifdef IVAS_FLOAT_FIXED
        vbap_free_data_fx(&vbap);
#else
        vbap_free_data( &vbap );
#endif
    }

    return IVAS_ERR_OK;
@@ -959,32 +963,6 @@ void vbap_free_data(
    {
        free( ( *hVBAPdata )->search_struct[1].triplets );
    }
#ifdef IVAS_FLOAT_FIXED
    IF((*hVBAPdata)->bottom_virtual_speaker_node_division_gains_fx != NULL)
    {
        free((*hVBAPdata)->bottom_virtual_speaker_node_division_gains_fx);
    }
    IF((*hVBAPdata)->top_virtual_speaker_node_division_gains_fx != NULL)
    {
        free((*hVBAPdata)->top_virtual_speaker_node_division_gains_fx);
    }
    IF((*hVBAPdata)->back_virtual_speaker_node_division_gains_fx != NULL)
    {
        free((*hVBAPdata)->back_virtual_speaker_node_division_gains_fx);
    }
    IF((*hVBAPdata)->object_mode_bottom_virtual_speaker_node_division_gains_fx != NULL)
    {
        free((*hVBAPdata)->object_mode_bottom_virtual_speaker_node_division_gains_fx);
    }
    IF((*hVBAPdata)->object_mode_top_virtual_speaker_node_division_gains_fx != NULL)
    {
        free((*hVBAPdata)->object_mode_top_virtual_speaker_node_division_gains_fx);
    }
    IF((*hVBAPdata)->object_mode_back_virtual_speaker_node_division_gains_fx != NULL)
    {
        free((*hVBAPdata)->object_mode_back_virtual_speaker_node_division_gains_fx);
    }
#endif
    free( *hVBAPdata );
    *hVBAPdata = NULL;