diff options
| author | Mark Harris <mark.hsj@gmail.com> | 2016-08-27 07:10:15 -0700 |
|---|---|---|
| committer | Mark Harris <mark.hsj@gmail.com> | 2016-08-27 07:10:15 -0700 |
| commit | 7d0e33f7f12ade89341b84c3339f5514a17e75c5 (patch) | |
| tree | fb6f17566de92cb541a1d2b2a9f09271df219eca | |
| parent | 3421f6d2baebd064ed42d7ee5814b511be11c105 (diff) | |
| download | opus-7d0e33f7f12ade89341b84c3339f5514a17e75c5.tar.gz | |
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.
| -rw-r--r-- | src/opus_multistream_encoder.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c index e722e31a..f4e00fe5 100644 --- a/src/opus_multistream_encoder.c +++ b/src/opus_multistream_encoder.c @@ -861,13 +861,11 @@ static int opus_multistream_encode_native { 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 |
