From owner-freebsd-ports Sat Feb 16 13:50:19 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0CA9437B416 for ; Sat, 16 Feb 2002 13:50:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1GLo1R50961; Sat, 16 Feb 2002 13:50:01 -0800 (PST) (envelope-from gnats) Received: from mx1.thinksec.com (time.thinksec.com [193.212.248.2]) by hub.freebsd.org (Postfix) with ESMTP id 9136F37B416 for ; Sat, 16 Feb 2002 13:41:05 -0800 (PST) Received: from des.thinksec.com (213-145-188-14.dd.nextgentel.com [213.145.188.14]) by mx1.thinksec.com (Postfix) with ESMTP id 513A647E93 for ; Sat, 16 Feb 2002 22:41:04 +0100 (CET) Received: by des.thinksec.com (Postfix, from userid 2602) id AF47355FE; Sat, 16 Feb 2002 22:41:03 +0100 (CET) Message-Id: <20020216214103.AF47355FE@des.thinksec.com> Date: Sat, 16 Feb 2002 22:41:03 +0100 (CET) From: Dag-Erling Smorgrav Reply-To: Dag-Erling Smorgrav To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/35009: audio/mpg123 port contains bogus patch Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 35009 >Category: ports >Synopsis: audio/mpg123 port contains bogus patch >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Feb 16 13:50:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Dag-Erling Smorgrav >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD des.thinksec.com 5.0-CURRENT FreeBSD 5.0-CURRENT #129: Fri Feb 15 16:45:40 CET 2002 des@des.thinksec.com:/usr/src/sys/i386/compile/DES i386 >Description: ports/audio/mpg123/files/patch-audio.c is bogus: get_capabilities() is only called if the verbose level is 2 or higher. If you try to enable buffering without setting a high verbose level, you get the following: % mpg123 -b 512 **/*3 High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3. Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp. Uses code from various people. See 'README' for more! THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK! Directory: Volume 2/CD 1/ Playing MPEG stream from track01.mp3 ... MPEG 1.0 layer III, 112 kbit/s, 44100 Hz joint-stereo No supported rate found! Yuck! Error in buffer handling...: Undefined error: 0 Moreover, with the patch applied, get_capabilities() is called once for each possible combination of channel number, rate and encoding, which for an average sound card is something like 120 combinations; however, get_capabilities() already iterates over all those combinations, calling audio_get_formats() once for each, this results in 14400 calls to audio_get_formats(), which is 14280 too many - and audio_get_formats() is I/O- intensive, so the patch slows mpg123 down to a crawl at startup. The original code loops over all channel/rate/encoding combinations exactly once, before checking the verbosity level. BTW, the kernel bug that ports/audio/mpg123/files/patch-ad tries to work around was fixed at least half a year ago. >How-To-Repeat: See above. >Fix: Nuke ports/audio/mpg123/files/patch-audio.c. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message