Make opus_decoder_create set its error code.

This commit is contained in:
Gregory Maxwell 2011-09-04 04:25:12 -04:00
parent 858468ee42
commit a40721a92e

View file

@ -132,6 +132,8 @@ OpusDecoder *opus_decoder_create(opus_int32 Fs, int channels, int *error)
return NULL;
}
ret = opus_decoder_init(st, Fs, channels);
if (error)
*error = ret;
if (ret != OPUS_OK)
{
opus_free(st);