      /* recover coefficients if rematrixing is in use */
      if(s->channel_mode == AC3_CHMODE_STEREO)
          do_rematrixing(s);
-@@ -1177,6 +1264,10 @@
+@@ -1177,6 +1269,10 @@
          s->dsp.int32_to_float_fmul_scalar(s->transform_coeffs[ch], s->fixed_coeffs[ch], gain, 256);
      }
  

             if (cpl_start_subband >= cpl_end_subband) {
                 av_log(s->avctx, AV_LOG_ERROR, "invalid coupling range (%d >= %d)\n",
                        cpl_start_subband, cpl_end_subband);
@@ -938,8 +1022,11 @@
     if (channel_mode == AC3_CHMODE_STEREO) {
         if ((s->eac3 && !blk) || get_bits1(gbc)) {
             s->num_rematrixing_bands = 4;

     /* coupling strategy */
     if (s->eac3 ? s->cpl_strategy_exists[blk] : get_bits1(gbc)) {
         memset(bit_alloc_stages, 3, AC3_MAX_CHANNELS);
@@ -863,9 +948,9 @@
                 s->phase_flags_in_use = get_bits1(gbc);
 
             /* coupling frequency range */
