26 lines
745 B
Text
26 lines
745 B
Text
$NetBSD: patch-aa,v 1.1 2004/06/26 09:16:10 grant Exp $
|
|
|
|
--- 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");
|