Subject: pkg/20204: devel/smpeg's plaympeg doesn't play audio
To: None <gnats-bugs@gnats.netbsd.org>
From: None <soren@blef.org>
List: netbsd-bugs
Date: 02/05/2003 00:14:24
>Number: 20204
>Category: pkg
>Synopsis: devel/smpeg's plaympeg doesn't play audio
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 04 16:10:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:
>Release: NetBSD 1.6M
>Organization:
>Environment:
System: NetBSD monstar 1.6M NetBSD 1.6M (MONSTAR) #0: Tue Jan 28 18:05:20 PST 2003 soren@monstar:/usr/src/sys/arch/i386/compile/MONSTAR i386
Architecture: i386
Machine: i386
>Description:
plaympeg can't initialize SDL's audio subsystem because it calls SDL_Init,
which can only be called once in a program.
>How-To-Repeat:
Try to play a movie with plaympeg.
>Fix:
Use SDL_InitSubSystem(3) instead of SDL_Init(3). Add as patch-aa in the patches
directory:
--- plaympeg.c.orig Tue Feb 4 15:59:22 2003
+++ plaympeg.c Tue Feb 4 15:59:48 2003
@@ -492,6 +492,7 @@
int fd;
char buf[32];
int status;
+ int (*audio_init)();
/* Get the command line options */
use_audio = 1;
@@ -600,7 +601,12 @@
}
if ( use_audio ) {
- if ((SDL_Init(SDL_INIT_AUDIO) < 0) || !SDL_AudioDriverName(buf, 1)) {
+ if ( use_video )
+ audio_init = SDL_InitSubSystem;
+ else
+ audio_init = SDL_Init;
+
+ if ((audio_init(SDL_INIT_AUDIO) < 0) || !SDL_AudioDriverName(buf, 1)) {
fprintf(stderr, "Warning: Couldn't init SDL audio: %s\n",
SDL_GetError());
fprintf(stderr, "Will ignore audio stream\n");
Update distinfo:
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/smpeg/distinfo,v
retrieving revision 1.5
diff -u -r1.5 distinfo
--- distinfo 2002/12/15 10:01:39 1.5
+++ distinfo 2003/02/05 00:06:48
@@ -2,3 +2,4 @@
SHA1 (smpeg-0.4.4.tar.gz) = 6d7f4449472e6270ab435b2224f3fad951c35259
Size (smpeg-0.4.4.tar.gz) = 315054 bytes
+SHA1 (patch-aa) = 1742f034c5acfd2b9e82c94b11ae237a5de33bf2
>Release-Note:
>Audit-Trail:
>Unformatted: