vishnu's patch

Original commit message from CVS:
vishnu's patch
This commit is contained in:
Thomas Vander Stichele 2002-07-10 21:14:13 +00:00
parent cb64911d06
commit 88772a64b5
2 changed files with 37 additions and 36 deletions

2
common

@ -1 +1 @@
Subproject commit 1a826743b023d38a14e16cf1b3fb85eabdbb65d6 Subproject commit 316e406cd246e8cbccdf4df4ce32e98c63d7cc72

View file

@ -796,8 +796,12 @@ gst_osssink_open_audio (GstOssSink *sink)
close (sink->fd); close (sink->fd);
sink->fd = open (sink->device, O_WRONLY); sink->fd = open (sink->device, O_WRONLY);
/* if we have it, set the default parameters and go have fun */ if (sink->fd < 0) {
if (sink->fd >= 0) { g_warning ("osssink: unable to open the sound device (errno=%d)\n", errno);
return FALSE;
}
/* we have it, set the default parameters and go have fun */
/* set card state */ /* set card state */
ioctl (sink->fd, SNDCTL_DSP_GETCAPS, &caps); ioctl (sink->fd, SNDCTL_DSP_GETCAPS, &caps);
@ -841,9 +845,6 @@ gst_osssink_open_audio (GstOssSink *sink)
return TRUE; return TRUE;
} }
return FALSE;
}
static void static void
gst_osssink_close_audio (GstOssSink *sink) gst_osssink_close_audio (GstOssSink *sink)
{ {