Improve opus_decode() error code consistency.
authorGregory Maxwell <greg@xiph.org>
Sun, 2 Oct 2011 18:27:51 +0000 (14:27 -0400)
committerGregory Maxwell <greg@xiph.org>
Sun, 2 Oct 2011 18:27:51 +0000 (14:27 -0400)
src/opus_decoder.c

index 0ebbfaf..66de96c 100644 (file)
@@ -666,7 +666,7 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data,
        tot_offset += offset;
 
        if (count*st->frame_size > frame_size)
-               return OPUS_BAD_ARG;
+               return OPUS_BUFFER_TOO_SMALL;
        nb_samples=0;
        for (i=0;i<count;i++)
        {