Commit 6e400c3c authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Fix float issue 1569 by adding proper error checks.

parent dfed311f
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1179,7 +1179,7 @@ int main(
    /* Set reverb room size if specified */
    if ( args.reverbRoomSize != IVAS_ROOM_SIZE_AUTO )
    {
        if ( ( IVAS_REND_SetReverbRoomSize( hIvasRend, args.reverbRoomSize ) ) != IVAS_ERR_OK )
        if ( ( error = IVAS_REND_SetReverbRoomSize( hIvasRend, args.reverbRoomSize ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError setting reverb room size\n" );
            goto cleanup;
+1 −0
Original line number Diff line number Diff line
@@ -178,6 +178,7 @@
#define FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API            /* Expose Payload Type setting in RTP Header */
#define FIX_1563_FIX_STEREO_SW                          /* VA: float issue 1563: fix clicks in stereo switching */
#define FIX_1562_DTX_CRASH_DECODER                      /* VA: float issue 1562: fix crash in stereo decoding in DTX and bitrate switching */
#define FIX_FLOAT_1569_REND_RENDER_CONFIG_CHECKS        /* Nokia: float issue 1569: fix render config checks in renderer */

/* ##################### End NON-BE switches ########################### */

+10 −0
Original line number Diff line number Diff line
@@ -4095,11 +4095,21 @@ ivas_error IVAS_REND_AddInput(
    /* select default reverb size after adding an input */
    if ( hIvasRend->selectedRoomReverbSize == DEFAULT_REVERB_UNSET )
    {
#ifdef FIX_FLOAT_1569_REND_RENDER_CONFIG_CHECKS
        if ( ( error = IVAS_REND_SetReverbRoomSize( hIvasRend, getDefaultReverbSize( hIvasRend->inputsIsm,
                                                                                     hIvasRend->inputsMasa,
                                                                                     hIvasRend->inputsMc,
                                                                                     hIvasRend->inputsSba ) ) ) != IVAS_ERR_OK )
        {
            return error;
        }
#else
        IVAS_REND_SetReverbRoomSize( hIvasRend,
                                     getDefaultReverbSize( hIvasRend->inputsIsm,
                                                           hIvasRend->inputsMasa,
                                                           hIvasRend->inputsMc,
                                                           hIvasRend->inputsSba ) );
#endif
    }

    return IVAS_ERR_OK;