Commit fc66793e authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Adds some checks to the surround API

parent f7ad6fe3
......@@ -272,6 +272,8 @@ int opus_multistream_surround_encoder_init(
int application
)
{
if ((channels>255) || (channels<1))
return OPUS_BAD_ARG;
st->lfe_stream = -1;
if (mapping_family==0)
{
......@@ -306,9 +308,8 @@ int opus_multistream_surround_encoder_init(
mapping[i] = i;
} else
return OPUS_UNIMPLEMENTED;
opus_multistream_encoder_init_impl(st, Fs, channels, *streams, *coupled_streams,
return opus_multistream_encoder_init_impl(st, Fs, channels, *streams, *coupled_streams,
mapping, application, channels>2&&mapping_family==1);
return OPUS_OK;
}
OpusMSEncoder *opus_multistream_encoder_create(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment