Subject: pkg/32268: pkg audio/faad2 bugfix for stdout
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 12/08/2005 04:45:00
>Number:         32268
>Category:       pkg
>Synopsis:       supurious newline char on stdout from faad screws up audio
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 08 04:45:00 +0000 2005
>Originator:     Parag Patel
>Release:        NetBSD 2.1.0_STABLE
CodeGen, Inc.
System: NetBSD 2.1.0_STABLE NetBSD 2.1.0_STABLE (HAMMER) #0: Sun Nov 20 14:42:52 PST 2005 amd64
Architecture: x86_64
Machine: amd64
	faad (pkgsrc/audio/faad2) can generate a bogus newline character on
	stdout if there are ID tags in an AAC (M4A) file.  This can mess up
	audio if that is also redirected to stdout, as it is by slimserver
	(for instance) before sending to a Squeezbox.

	run "faad -w infile.m4a > out.wav" and "faad infile.m4a", then compare
	the generated files infile.wav and out.wav.

	The attached patch to main.c puts the newline character on stderr,
	where it should have been all along.

--- frontend/main.c.orig	2005-12-07 20:34:20.000000000 -0800
+++ frontend/main.c	2005-12-07 20:34:28.000000000 -0800
@@ -832,7 +832,7 @@
-        if (j > 0) printf("\n");
+        if (j > 0) fprintf(stderr, "\n");