mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-25 07:26:29 +00:00
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
This commit is contained in:
parent
fb5a5c069c
commit
adb5efaf8a
1 changed files with 8 additions and 1 deletions
|
@ -430,8 +430,15 @@ gst_directsound_sink_open (GstAudioSink * asink)
|
||||||
|
|
||||||
dsoundsink = GST_DIRECTSOUND_SINK (asink);
|
dsoundsink = GST_DIRECTSOUND_SINK (asink);
|
||||||
|
|
||||||
if (dsoundsink->device_id)
|
if (dsoundsink->device_id) {
|
||||||
lpGuid = string_to_guid (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 */
|
/* create and initialize a DirecSound object */
|
||||||
if (FAILED (hRes = DirectSoundCreate (lpGuid, &dsoundsink->pDS, NULL))) {
|
if (FAILED (hRes = DirectSoundCreate (lpGuid, &dsoundsink->pDS, NULL))) {
|
||||||
|
|
Loading…
Reference in a new issue