[Gstreamer-bugs] [Bug 94429] New - gst_osssink_open_audio fails to open when blocked

bugzilla-daemon at widget.gnome.org bugzilla-daemon at widget.gnome.org
Sat Sep 28 10:35:10 PDT 2002


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

http://bugzilla.gnome.org/show_bug.cgi?id=94429

Changed by mmarquee at btinternet.com.

--- shadow/94429	Sat Sep 28 13:35:10 2002
+++ shadow/94429.tmp.28467	Sat Sep 28 13:35:10 2002
@@ -0,0 +1,40 @@
+Bug#: 94429
+Product: GStreamer
+Version: 0.4.1
+OS: Linux
+OS Details: Redhat 7.3 - 2.4.18-5
+Status: NEW   
+Resolution: 
+Severity: major
+Priority: Normal
+Component: gst-plugins
+AssignedTo: gstreamer-maint at bugzilla.gnome.org                            
+ReportedBy: mmarquee at btinternet.com               
+QAContact: gstreamer-maint at bugzilla.gnome.org
+TargetMilestone: 0.4.0
+URL: 
+Summary: gst_osssink_open_audio fails to open when blocked
+
+Actually found this when testing 'rhythmbox'. The osssink fails to open
+with the error "osssink: unable to open the sound device (in use ?)".
+Looked at the code for 'gst_osssink_open_audio' in
+'gst-plugins/sys/oss/gstosssink.c'. When the call to open the device with
+O_NONBLOCK fails, the function returns false. Should it not try and open
+the device in blocking mode? If the device has already been opened, which
+it always has on my installation, this call with always fail. So the code ..
+
+sink->fd = open (sink->device, O_WRONLY | O_NONBLOCK);
+  if (errno == EBUSY) {
+    g_warning ("osssink: unable to open the sound device (in use ?)\n");
+    return FALSE;
+  }
+
+... could be replaced with ...
+
+sink->fd = open (sink->device, O_WRONLY | O_NONBLOCK);
+  if (errno == EBUSY) {
+    g_warning ("osssink: unable to open the sound device (in use ?)\n");
+  }
+
+... and the rest of the function will be executed. I've tested it and it
+works for me!





More information about the Gstreamer-bugs mailing list