Skip to content
Snippets Groups Projects
Commit 337f34cf authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Adds some checks to the surround API

parent 8e3a1cbf
No related branches found
No related tags found
No related merge requests found
......@@ -224,6 +224,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)
{
......@@ -258,9 +260,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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment