Commit a72d7cce authored by multrus's avatar multrus
Browse files

set st_ivas->nchan_ism correctly

parent 2fffff98
Loading
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -419,9 +419,16 @@ ivas_error ivas_dec_setup(
#endif
#ifdef SBA_AND_OBJECTS
        else if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
        {
            if (st_ivas->ism_mode == ISM_SBA_MODE_DISC )
            {
                /* the number of objects is written at the end of the bitstream, in the SBA metadata */
                st_ivas->nchan_ism = 2 * st_ivas->bit_stream[ivas_total_brate / FRAMES_PER_SEC - 1] + st_ivas->bit_stream[ivas_total_brate / FRAMES_PER_SEC - 2] + 1;
            }
            else
            {
                st_ivas->nchan_ism = 0;
            }

            if ( ivas_total_brate < IVAS_24k4 || ivas_total_brate >= IVAS_256k )
            {