shithub: opus

Download patch

ref: 32af90ae65a0ad5dbef9502ded2c5d9f48be18f7
parent: 8714189c6495eae49829b8e649101ba3bdc86127
author: Gregory Maxwell <[email protected]>
date: Sun Oct 2 10:27:51 EDT 2011

Improve opus_decode() error code consistency.

--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -666,7 +666,7 @@
 	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++)
 	{