Commit 83d74290 authored by vaclav's avatar vaclav
Browse files

Merge branch '779-crash-in-ism-rate-switching-with-binaural_room_reverb' into 'main'

Resolve "Crash in ISM rate switching with BINAURAL_ROOM_REVERB"

See merge request !1062
parents da859053 ea5b02b2
Loading
Loading
Loading
Loading
Loading

lib_com/options.h

100755 → 100644
+1 −0
Original line number Diff line number Diff line
@@ -187,6 +187,7 @@
#define NONBE_FIX_760_COHERENCE_MASA                          /* Nokia: Issue 760: fixes decoder crash for some cases when all energy ratios are 1 */
#define NONBE_FIX_752_OSBA_MISCONFIG_MCT                      /* FhG: issue 752: misconfiguration of MCT causes crashes for coding with sampling rate under 48kHz at 256kbps*/
#define NONBE_FIX_727_MC_PARAMUPMIX_HEADROTATION              /* Dlb : issue 727 : headrotation in MC paramupmix mode*/
#define NONBE_FIX_779_ISM_FREE_REVERB_HANDLE                  /* VA: issue 779: fix Crash in ISM rate switching with BINAURAL_ROOM_REVERB */

#define NONBE_FIX_722_MEMORY_LEAK_IN_PARAMUPMIX               /* Dlb : issue 722: memory leak fix in MC param upmix mode with BR switching*/
#define NONBE_FIX_780_ISM_STARTS_WITH_SID                     /* VA: issue 780: fix Crash in ISM decoding when bitstream starts with an SID and output_config is not EXT */
+21 −8
Original line number Diff line number Diff line
@@ -1286,8 +1286,16 @@ void ivas_reverb_close(

    hReverb = *hReverb_in;

#ifdef NONBE_FIX_779_ISM_FREE_REVERB_HANDLE
    if ( *hReverb_in == NULL || hReverb_in == NULL )
    {
        return;
    }

#else
    if ( hReverb != NULL )
    {
#endif
    for ( loop_idx = 0; loop_idx < IVAS_REV_MAX_NR_BRANCHES; loop_idx++ )
    {
        if ( hReverb->loop_delay_buffer[loop_idx] != NULL )
@@ -1300,9 +1308,14 @@ void ivas_reverb_close(
    free( hReverb->pPredelay_buffer );
    hReverb->pPredelay_buffer = NULL;

#ifdef NONBE_FIX_779_ISM_FREE_REVERB_HANDLE
    free( *hReverb_in );
    *hReverb_in = NULL;
#else
        free( hReverb );
        hReverb = NULL;
    }
#endif

    return;
}