Commit 3ff46ed9 authored by vaclav's avatar vaclav
Browse files

avoid rewriting of 'st->nchan_ism'

parent 0e6dd15f
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -199,6 +199,9 @@ ivas_error ivas_dec_setup(
            }

            /* this should be non-zero if original input format was MASA_ISM_FORMAT */
#ifdef NONBE_1199_OMASA_JBM_BRATE_SW_FLUSH
            st_ivas->ism_mode = ISM_MODE_NONE;
#endif
            st_ivas->nchan_ism = st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 3] + 2 * st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 2];

            if ( st_ivas->nchan_ism > 0 )
@@ -216,15 +219,12 @@ ivas_error ivas_dec_setup(
                {
                    st_ivas->nchan_ism = 1;
                }

                /* for MASA_ISM_FORMAT at input the number of MASA transport channels is always 2 and the corresponding bit is not used here*/
                st_ivas->nchan_transport = 2;
                element_mode_flag = 1;
            }

#ifdef NONBE_1199_OMASA_JBM_BRATE_SW_FLUSH
            st_ivas->ism_mode = ISM_MODE_NONE;

#endif
            if ( st_ivas->ini_frame > 0 )
            {
                /* reconfigure in case a change of operation mode is detected */
+12 −0
Original line number Diff line number Diff line
@@ -155,8 +155,20 @@ ivas_error ivas_masa_decode(
            {
                /* re-read the number of objects, needed in case of bad frame  */
                st_ivas->nchan_ism = 5 - ( st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 3] + 2 * st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 2] );

#ifdef NONBE_1199_OMASA_JBM_BRATE_SW_FLUSH
                if ( st_ivas->nchan_ism == 5 )
                {
                    st_ivas->nchan_ism = 0;
                }
#endif
            }

#ifdef NONBE_1199_OMASA_JBM_BRATE_SW_FLUSH
            if ( ivas_format == MASA_FORMAT && st_ivas->nchan_ism > 0 )
#else
            if ( ivas_format == MASA_FORMAT && st_ivas->nchan_ism != 5 )
#endif
            {
                /* there was OMASA in the input */
                hMasa->config.input_ivas_format = MASA_ISM_FORMAT;