Commit a836b4e8 authored by Jouni Paulus's avatar Jouni Paulus
Browse files

fix issue 613 by moving hSpar member access under guardian condition. switch...

fix issue 613 by moving hSpar member access under guardian condition. switch FIX_613_DIRAC_NULL_PTR_USAN
parent 944c7622
Loading
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -111,12 +111,20 @@ ivas_error ivas_dirac_config(
        if ( ( (Encoder_Struct *) st_ivas )->hSpar != NULL )
        {
            hFbMdft = ( (Encoder_Struct *) st_ivas )->hSpar->hFbMixer;
#ifdef FIX_613_DIRAC_NULL_PTR_USAN
            dirac_to_spar_md_bands = ( (Encoder_Struct *) st_ivas )->hSpar->dirac_to_spar_md_bands;
#endif
        }
        else
        {
            hFbMdft = NULL;
#ifdef FIX_613_DIRAC_NULL_PTR_USAN
            dirac_to_spar_md_bands = NULL;
#endif
        }
#ifndef FIX_613_DIRAC_NULL_PTR_USAN
        dirac_to_spar_md_bands = ( (Encoder_Struct *) st_ivas )->hSpar->dirac_to_spar_md_bands;
#endif
    }
    else
    {
@@ -131,13 +139,21 @@ ivas_error ivas_dirac_config(
        if ( ( (Decoder_Struct *) st_ivas )->hSpar != NULL )
        {
            hFbMdft = ( (Decoder_Struct *) st_ivas )->hSpar->hFbMixer;
#ifdef FIX_613_DIRAC_NULL_PTR_USAN
            dirac_to_spar_md_bands = ( (Decoder_Struct *) st_ivas )->hSpar->dirac_to_spar_md_bands;
#endif
        }
        else
        {
            hFbMdft = NULL;
#ifdef FIX_613_DIRAC_NULL_PTR_USAN
            dirac_to_spar_md_bands = NULL;
#endif
        }
        ( (Decoder_Struct *) st_ivas )->hDirAC->hFbMdft = hFbMdft;
#ifndef FIX_613_DIRAC_NULL_PTR_USAN
        dirac_to_spar_md_bands = ( (Decoder_Struct *) st_ivas )->hSpar->dirac_to_spar_md_bands;
#endif
    }

    if ( ivas_format == SBA_FORMAT )
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@
#define FIX_MEM_REALLOC_IND_LIST                        /* VA: issue 601: failure of the automatic memory re-allocation mechanism when ind_list[] buffer is depleted in MASA mode with 2 TC*/
#define FIX_581_CLANG_OFFSET_TO_NULL                    /* FhG: issue 581: fix CLANG error about applying an offset to a NULL pointer */
#define JBM_PARAMUPMIX                                  /* Dlb: Issue 471: Integrate the Multichannel Parametric Upmix into the JBM path */
#define FIX_613_DIRAC_NULL_PTR_USAN                     /* Nokia: Issue #613: USAN in DirAC decoder setup */

/* ################## End BE DEVELOPMENT switches ######################### */