unsigned i;
/* Should apply the filter in Table 6-11 when upsampling. For
* now, just duplicate. */
- for (i = 511; i > 0; i--) {
+ for (i = 255; i > 0; i--) {
samples[2 * i] =
samples[2 * i + 1] = samples[i];
}
}
// set AVCodec values with parsed data
avctx->sample_rate = s->sample_rate;
- avctx->bit_rate = s->bit_rate;
s->profile = FF_PROFILE_DTS;
/* If downmixing to stereo, don't decode additional channels.
* FIXME: Using the xch_disable flag for this doesn't seem right. */
if (!s->xch_disable)
- channels += s->xll_channels - s->xll_residual_channels;
+ channels = s->xll_channels;
}
}
if (ret < 0)
return ret;
+ if ( avctx->profile != FF_PROFILE_DTS_HD_MA
+ && avctx->profile != FF_PROFILE_DTS_HD_HRA)
+ avctx->bit_rate = s->bit_rate;
*got_frame_ptr = 1;
return buf_size;