Commit f7647073 authored by Jan Kiene's avatar Jan Kiene
Browse files

Accept FIX_FMSW_DEC_2

parent 0611b16b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -3354,14 +3354,12 @@ static ivas_error decodeVoIP(
        /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */
        rtpTimeStamp = rtpTimeStamp / 16;

#ifdef FIX_FMSW_DEC_2
        arg.decMode = ( ivasRtp.codecId == IVAS_RTP_EVS ) ? IVAS_DEC_MODE_EVS : IVAS_DEC_MODE_IVAS;
        if ( ( error = IVAS_DEC_Restart( hIvasDec, arg.decMode ) ) != IVAS_ERR_OK ) /* note: when the RTP bitstream starts with EVS, do the restart */
        {
            fprintf( stderr, "\nIVAS_DEC_Restart restart failed: %s\n", IVAS_DEC_GetErrorMessage( error ) );
            goto cleanup;
        }
#endif
    }
    if ( error != IVAS_ERR_OK )
    {
+0 −8
Original line number Diff line number Diff line
@@ -167,12 +167,10 @@ static ivas_error ivas_dec_handle_init(
    st_ivas->writeFECoffset = 0;
    st_ivas->sba_analysis_order = 0; /* not really used in EVS mode, but initialize here to fix MSAN complaint */

#ifdef FIX_FMSW_DEC_2
    st_ivas->last_ivas_format = UNDEFINED_FORMAT;
    st_ivas->nSCE = 0;
    st_ivas->nCPE = 0;

#endif
    if ( mode == IVAS_DEC_MODE_EVS )
    {
        st_ivas->element_mode_init = EVS_MONO;
@@ -319,18 +317,13 @@ ivas_error IVAS_DEC_Restart(
        {
            return IVAS_ERR_OK;
        }
#ifdef FIX_FMSW_DEC_2
        else
        {
            /* switching between EVS and IVAS signaled in RTP */
            hIvasDec->st_ivas->restartNeeded = 1;
        }
#else
        return IVAS_ERR_WRONG_PARAMS;
#endif
    }

#ifdef FIX_FMSW_DEC_2
    if ( hIvasDec->mode != mode ) /* handle switching between EVS and IVAS */
    {
        /* initialize JBM */
@@ -344,7 +337,6 @@ ivas_error IVAS_DEC_Restart(
        hIvasDec->isInitialized = false;
    }

#endif
    hIvasDec->mode = mode;

    /* destroy Split binaural renderer (ISAR) handle */