Make opus_decoder_create set its error code.
authorGregory Maxwell <greg@xiph.org>
Sun, 4 Sep 2011 08:25:12 +0000 (04:25 -0400)
committerGregory Maxwell <greg@xiph.org>
Sun, 4 Sep 2011 08:25:12 +0000 (04:25 -0400)
src/opus_decoder.c

index ce6e9ce..4361e5b 100644 (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);