Commit 2ece6fcc authored by vaclav's avatar vaclav
Browse files

add updateOnFormatSwitching(0 to G.192 path

parent e15fd381
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -2289,8 +2289,12 @@ static ivas_error decodeG192(
    SplitFileReadWrite *splitRendWriter = NULL;
    int16_t isSplitRend, isSplitCoded;
#ifdef FIX_FLOAT_1539_G192_FORMAT_SWITCH
#ifdef FIX_FMSW_DEC_EXT
    bool restartNeeded = false;
#else
    bool restartNeeded;
#endif
#endif

#ifdef VARIABLE_SPEED_DECODING
    if ( arg.tsmEnabled )
@@ -2777,6 +2781,18 @@ static ivas_error decodeG192(
            }
        }

#ifdef FIX_FMSW_DEC_EXT
        /* Output writing update in case of format switching and EXTERNAL output */
        if ( restartNeeded && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
        {
            if ( ( error = updateOnFormatSwitching( hIvasDec, &bsFormat, arg.outputWavFilename, &masaWriter, ismWriters, &nOutChannels, &numObj, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "Error in updateOnFormatSwitching(): %s\n", IVAS_DEC_GetErrorMessage( error ) );
                goto cleanup;
            }
        }
#endif

        /* Write current frame */
        if ( decodedGoodFrame )
        {