diff options
Diffstat (limited to 'sbc')
| -rw-r--r-- | sbc/sbcdec.c | 3 | ||||
| -rw-r--r-- | sbc/sbcenc.c | 6 | 
2 files changed, 4 insertions, 5 deletions
| diff --git a/sbc/sbcdec.c b/sbc/sbcdec.c index 5ac02b44..5029d317 100644 --- a/sbc/sbcdec.c +++ b/sbc/sbcdec.c @@ -170,8 +170,7 @@ static void decode(char *filename, char *output, int tofile)  		 * length of the file (!) */  		pos += framelen;  		framelen = sbc_decode(&sbc, stream + pos, streamlen - pos, -					buf + count, sizeof(buf) - count, -					&len); +					buf + count, sizeof(buf) - count, &len);  	}  	if (count > 0) { diff --git a/sbc/sbcenc.c b/sbc/sbcenc.c index e17f8fdb..6821759d 100644 --- a/sbc/sbcenc.c +++ b/sbc/sbcenc.c @@ -172,7 +172,7 @@ static void encode(char *filename, int subbands, int joint)  	while (1) {  		if (size < sizeof(input)) {  			len = __read(fd, input + size, sizeof(input) - size); -			if (len == 0) +			if (len == 0 && size == 0)  				break;  			if (len < 0) { @@ -183,8 +183,8 @@ static void encode(char *filename, int subbands, int joint)  			size += len;  		} -		len = sbc_encode(&sbc, input, size, output, sizeof(output), -					&encoded); +		len = sbc_encode(&sbc, input, size, +					output, sizeof(output), &encoded);  		if (len < size)  			memmove(input, input + len, size - len); | 
