~ft/aacenc

d2cdbaf885cfe2efabe0b4c1a6011bb3fb5b2781 — Sigrid Solveig Haflínudóttir 1 year, 5 months ago fdff41e
aacenc: check for errors Bflush returns
1 files changed, 2 insertions(+), 5 deletions(-)

M frontend/aacenc.c
M frontend/aacenc.c => frontend/aacenc.c +2 -5
@@ 152,14 152,11 @@ main(int argc, char **argv)
			for(i = 0; i < 8; i++, ns >>= 8)
				ph[12+i] = ns;
			ns = 0;
			if(Bwrite(&out, ph, sizeof(ph)) < 0)
			if(Bwrite(&out, ph, sizeof(ph)) < 0 || Bflush(&out) < 0)
				break;
			Bflush(&out);
		}
		if(Bwrite(&out, obuf, sz) < 0)
		if(Bwrite(&out, obuf, sz) < 0 || (nobuffer && Bflush(&out) < 0))
			break;
		if(nobuffer)
			Bflush(&out);
	}
	Bflush(&out);