ref: 7d0e33f7f12ade89341b84c3339f5514a17e75c5
parent: 3421f6d2baebd064ed42d7ee5814b511be11c105
author: Mark Harris <mark.hsj@gmail.com>
date: Sat Aug 27 03:10:15 EDT 2016
Correct multistream variable frame size stride The multistream encoder input has st->layout.nb_channels channels. The number of channels actually encoded is st->layout.nb_streams + st->layout.nb_coupled_streams, which may be fewer, so ideally it would only analyze those when computing the optimal frame size, but there is no code to do that currently.
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -861,13 +861,11 @@
{
opus_int32 delay_compensation;
- int channels;
- channels = st->layout.nb_streams + st->layout.nb_coupled_streams;
opus_encoder_ctl((OpusEncoder*)ptr, OPUS_GET_LOOKAHEAD(&delay_compensation));
delay_compensation -= Fs/400;
frame_size = compute_frame_size(pcm, analysis_frame_size,
- st->variable_duration, channels, Fs, st->bitrate_bps,
+ st->variable_duration, st->layout.nb_channels, Fs, st->bitrate_bps,
delay_compensation, downmix
#ifndef DISABLE_FLOAT_API
, st->subframe_mem