shithub: aacenc

Download patch

ref: 59beb46e1c55c4d44e9233335b9a97d5d384b474
parent: 0826f2e98f06d05257d66b9bd7368eda5802a534
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu Dec 2 20:43:39 EST 2021

sysfatal on read error

--- a/frontend/aacenc.c
+++ b/frontend/aacenc.c
@@ -126,7 +126,9 @@
 	ns = nsec();
 	for(;;){
 		for(n = 0; n == 0 || (n & (sizeof(*pcm)-1)) != 0; n += r){
-			if((r = Bread(&in, pcm+n, insz-n)) <= 0)
+			if((r = Bread(&in, pcm+n, insz-n)) < 0)
+				sysfatal("read: %r");
+			if(r == 0)
 				break;
 		}
 		if(n == 0)