summaryrefslogtreecommitdiff
path: root/multimedia/smpeg/patches/patch-aa
blob: 697bd22594b245213926df3249ba56d80d232730 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$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");