Commit ff0d8fd5 authored by Lauros Pajunen's avatar Lauros Pajunen
Browse files

Correct place for rtp restart, clean up

parent 606baabd
Loading
Loading
Loading
Loading
+21 −21
Original line number Diff line number Diff line
@@ -3161,6 +3161,19 @@ static ivas_error decodeVoIP(
        fprintf( stdout, "\n-- Start the decoder (quiet mode) --\n\n" );
    }

#ifdef WMOPS
    reset_stack();
    reset_wmops();
#endif

    /*------------------------------------------------------------------------------------------*
     * Main receiving/decoding loop
     *------------------------------------------------------------------------------------------*/

    while ( 1 )
    {
        nSamplesRendered = 0;

#ifdef DECODER_FORMAT_SWITCHING
        if ( ivasRtp.restartNeeded )
        {
@@ -3182,19 +3195,6 @@ static ivas_error decodeVoIP(
        }
#endif

#ifdef WMOPS
    reset_stack();
    reset_wmops();
#endif

    /*------------------------------------------------------------------------------------------*
     * Main receiving/decoding loop
     *------------------------------------------------------------------------------------------*/

    while ( 1 )
    {
        nSamplesRendered = 0;

        /* reference vector */
        if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 )
        {
+26 −24
Original line number Diff line number Diff line
@@ -291,11 +291,11 @@ ivas_error ivas_dec_get_format_fx(
#endif
                    return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong SBA order signalled!" );
                }
#else
#ifdef DEBUGGING
                fprintf( stderr, "\nError: Changing the SBA order is not supported!\n" );
#endif
                return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong SBA order signalled!" );
    #else
#endif
            }

@@ -659,9 +659,11 @@ ivas_error ivas_dec_get_format_fx(
            k = sub( k, 1 );

            test();
            IF( st_ivas->ini_frame > 0 && NE_16( nchan_ism, st_ivas->nchan_ism ) ){
            IF( st_ivas->ini_frame > 0 && NE_16( nchan_ism, st_ivas->nchan_ism ) )
            {
    #ifdef DECODER_FORMAT_SWITCHING
                IF( isVoipMode ){
                IF( isVoipMode )
                {
                    st_ivas->restartNeeded = 1;
                    move16();
                    return IVAS_ERR_OK;