From 32af90ae65a0ad5dbef9502ded2c5d9f48be18f7 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Sun, 2 Oct 2011 14:27:51 -0400 Subject: [PATCH] Improve opus_decode() error code consistency. --- src/opus_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opus_decoder.c b/src/opus_decoder.c index 0ebbfafd..66de96c6 100644 --- a/src/opus_decoder.c +++ b/src/opus_decoder.c @@ -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