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

Accept FIX_FMSW_DEC_2

parent b848ed39
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -2945,14 +2945,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
@@ -165,7 +165,6 @@ static ivas_error ivas_dec_handle_init(
    move16();
    move16();

#ifdef FIX_FMSW_DEC_2
    st_ivas->last_ivas_format = UNDEFINED_FORMAT;
    st_ivas->nSCE = 0;
    st_ivas->nCPE = 0;
@@ -173,7 +172,6 @@ static ivas_error ivas_dec_handle_init(
    move16();
    move16();

#endif
    IF( EQ_16( mode, IVAS_DEC_MODE_EVS ) )
    {
        st_ivas->element_mode_init = EVS_MONO;
@@ -355,19 +353,14 @@ 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;
            move16();
        }
#else
        return IVAS_ERR_WRONG_PARAMS;
#endif
    }

#ifdef FIX_FMSW_DEC_2
    IF( NE_16( hIvasDec->mode, mode ) ) /* handle switching between EVS and IVAS */
    {
        /* initialize JBM */
@@ -384,7 +377,6 @@ ivas_error IVAS_DEC_Restart(
        move16();
    }

#endif
    hIvasDec->mode = mode;
    move16();