[xiph-commits] r8720 - trunk/ao/src/plugins/alsa09

j at motherfish-iii.xiph.org j at motherfish-iii.xiph.org
Mon Jan 10 12:30:06 PST 2005


Author: j
Date: 2005-01-10 12:30:05 -0800 (Mon, 10 Jan 2005)
New Revision: 8720

Modified:
   trunk/ao/src/plugins/alsa09/ao_alsa09.c
Log:
close #454

Modified: trunk/ao/src/plugins/alsa09/ao_alsa09.c
===================================================================
--- trunk/ao/src/plugins/alsa09/ao_alsa09.c	2005-01-10 18:04:39 UTC (rev 8719)
+++ trunk/ao/src/plugins/alsa09/ao_alsa09.c	2005-01-10 20:30:05 UTC (rev 8720)
@@ -401,8 +401,10 @@
 error:
 	fprintf(stderr, "ALSA %s error: %s\n",
 			internal->cmd, snd_strerror(err));
-	if (internal->pcm_handle)
+	if (internal->pcm_handle) {
 		snd_pcm_close(internal->pcm_handle);
+		internal->pcm_handle = NULL;
+	}
 	return 0;
 }
 
@@ -492,6 +494,7 @@
 			if (internal->pcm_handle) {
 				snd_pcm_drain(internal->pcm_handle);
 				snd_pcm_close(internal->pcm_handle);
+				internal->pcm_handle=NULL;
 			} else
 				fprintf(stderr,"ao_plugin_close called with uninitialized ao_device->internal->pcm_handle\n");
 		} else



More information about the commits mailing list