Commit adb5efaf authored by Thomas Roos's avatar Thomas Roos Committed by Sebastian Dröge

directsoundsink: Check device property and fail if device can't be found

Don't use default if a specific device is set but it can't be found.

https://bugzilla.gnome.org/show_bug.cgi?id=759452
parent fb5a5c06
......@@ -430,8 +430,15 @@ gst_directsound_sink_open (GstAudioSink * asink)
dsoundsink = GST_DIRECTSOUND_SINK (asink);
if (dsoundsink->device_id)
if (dsoundsink->device_id) {
lpGuid = string_to_guid (dsoundsink->device_id);
if (lpGuid == NULL) {
GST_ELEMENT_ERROR (dsoundsink, RESOURCE, OPEN_READ,
("gst_directsound_sink_open: device set, but guid not found: %s",
dsoundsink->device_id), (NULL));
return FALSE;
}
}
/* create and initialize a DirecSound object */
if (FAILED (hRes = DirectSoundCreate (lpGuid, &dsoundsink->pDS, NULL))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment