Commit 03059ea8 authored by vaclav's avatar vaclav
Browse files

fix USAN

parent 5a52efec
Loading
Loading
Loading
Loading
Loading
+16 −13
Original line number Diff line number Diff line
@@ -351,6 +351,8 @@ static ivas_error ivas_ism_bitrate_switching(
     * floating-point output audio buffers
     *-----------------------------------------------------------------*/

    if ( !st_ivas->hDecoderConfig->voip_active )
    {
        nchan_out_buff = ivas_get_nchan_buffers( st_ivas );

        if ( nchan_out_buff > nchan_out_buff_old )
@@ -372,6 +374,7 @@ static ivas_error ivas_ism_bitrate_switching(
                st_ivas->p_output_f[ch] = NULL;
            }
        }
    }
#endif

    /*-----------------------------------------------------------------*
+16 −13
Original line number Diff line number Diff line
@@ -417,6 +417,8 @@ ivas_error ivas_omasa_dec_config(
         * floating-point output audio buffers
         *-----------------------------------------------------------------*/

        if ( !st_ivas->hDecoderConfig->voip_active )
        {
            nchan_out_buff = ivas_get_nchan_buffers( st_ivas );

            if ( nchan_out_buff > nchan_out_buff_old )
@@ -438,6 +440,7 @@ ivas_error ivas_omasa_dec_config(
                    st_ivas->p_output_f[k] = NULL;
                }
            }
        }
#endif
    }

+16 −13
Original line number Diff line number Diff line
@@ -532,6 +532,8 @@ ivas_error ivas_sba_dec_reconfigure(
     * floating-point output audio buffers
     *-----------------------------------------------------------------*/

    if ( !st_ivas->hDecoderConfig->voip_active )
    {
        nchan_out_buff = ivas_get_nchan_buffers( st_ivas );

        if ( nchan_out_buff > nchan_out_buff_old )
@@ -553,6 +555,7 @@ ivas_error ivas_sba_dec_reconfigure(
                st_ivas->p_output_f[ch] = NULL;
            }
        }
    }
#endif

    return error;
+6 −0
Original line number Diff line number Diff line
@@ -356,11 +356,17 @@ int16_t ivas_get_nchan_buffers(
            {
                nchan_out_buff = max( nchan_out_buff + st_ivas->nchan_ism, audioCfg2channels( output_config ) ); /* needed for ivas_sba_upmixer_renderer() */
            }
            else
            {
                nchan_out_buff = max( nchan_out_buff + st_ivas->nchan_ism, audioCfg2channels( output_config ) ); /* needed for iivas_spar_dec_upmixer_sf() which is based on 'nchan_out' */
            }
        }
        else if ( output_config == AUDIO_CONFIG_EXTERNAL )
        {
            nchan_out_buff = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism; /*take into account sba_ch_idx' in ivas_dec() */
        }

        nchan_out_buff = min( nchan_out_buff, MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS );
    }
    else if ( st_ivas->ivas_format == MC_FORMAT )
    {