Commit c0618faa authored by Jan Kiene's avatar Jan Kiene
Browse files

first part of fix for BW switches with simultaneous switch TO Mct

parent 2e2ec8a0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -181,6 +181,7 @@
#define NONBE_FIX_567_DOUBLE_STEREO_DMX                       /* Orange: Double-precision replaced by single-precision */   
#define NONBE_FIX_947_STEREO_DMX_EVS_POC                      /* Orange: Fix clicks on POC */  
#define NONBE_FIX_947_STEREO_DMX_EVS_PHA                      /* Orange: Fix issues on PHA */                                                                                        
#define NONBE_FIX_986_MC_BW_SWITCHING                         /* FhG: fix crash in bw and br switching with MC */

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

+21 −0
Original line number Diff line number Diff line
@@ -713,6 +713,26 @@ int16_t set_bw_mct(
    }

    bw_changed = 0;
#ifdef NONBE_FIX_986_MC_BW_SWITCHING
    if ( mct_bwidth != last_mct_bwidth )
    {
        bw_changed = 1;
    }

    /* 
     * always set bw for all CPEs even if it is the same value as before,
     * in case of bw + br switching when changing to MCT, this overwrites
     * potentially incorrect initial values
     */
    for ( cpe_id = 0; cpe_id < nCPE; cpe_id++ )
    {
        for ( ch = 0; ch < CPE_CHANNELS; ch++ )
        {
            st = hCPE[cpe_id]->hCoreCoder[ch];
            st->bwidth = mct_bwidth;
        }
    }
#else
    if ( mct_bwidth != last_mct_bwidth )
    {
        bw_changed = 1;
@@ -726,6 +746,7 @@ int16_t set_bw_mct(
            }
        }
    }
#endif

    return bw_changed;
}