Commit 8bdff558 authored by korse's avatar korse
Browse files

[fix] fix to allocate only necessary memory

parent 9e8f41d0
Loading
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -439,11 +439,20 @@ ivas_error ivas_ism_enc_config(
        Indice *ind_list_metadata;    /* list of indices */

        /* Reset and Initialize */
        if ((error = create_ism_metadata_enc(st_ivas, st_ivas->hEncoderConfig->nchan_inp, element_brate_tmp)) != IVAS_ERR_OK)
        if (st_ivas->ism_mode == ISM_MODE_PARAM)
        {
            return error;
            st_ivas->nchan_transport = 2;
        }
        else
        {
            st_ivas->nchan_transport = st_ivas->hEncoderConfig->nchan_inp;
        }

        st_ivas->nSCE = st_ivas->nchan_transport;
        st_ivas->nCPE = 0;

        ivas_ism_config(st_ivas->hEncoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hEncoderConfig->nchan_inp, NULL, NULL, NULL, element_brate_tmp, NULL, NULL);

        if (st_ivas->nSCE > last_nSCE)
        {
            /* Reconfigure the core coders */