[xiph-cvs] cvs commit: ao/src/plugins/alsa09 ao_alsa09.c

Stan Seibert volsung at xiph.org
Wed Sep 10 07:21:16 PDT 2003



volsung     03/09/10 10:21:16

  Modified:    src/plugins/alsa09 ao_alsa09.c
  Log:
  Clearly mark the pcm handle as uninitialized so we don't try and close it
  later.  Closes bug 450.

Revision  Changes    Path
1.17      +3 -1      ao/src/plugins/alsa09/ao_alsa09.c

Index: ao_alsa09.c
===================================================================
RCS file: /usr/local/cvsroot/ao/src/plugins/alsa09/ao_alsa09.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ao_alsa09.c	30 Aug 2003 16:48:26 -0000	1.16
+++ ao_alsa09.c	10 Sep 2003 14:21:15 -0000	1.17
@@ -336,8 +336,10 @@
         internal->cmd = "snd_pcm_open";
         err = snd_pcm_open(&(internal->pcm_handle), internal->dev,
                            SND_PCM_STREAM_PLAYBACK, 0);
-	if (err < 0)
+	if (err < 0) {
+		internal->pcm_handle = NULL;
                 goto error;
+	}
 
         /* Set up the hardware parameters, ie sample and buffer specs */
         err = alsa_set_hwparams(internal, format);

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list