diff options
Diffstat (limited to 'sys/directsound')
-rw-r--r-- | sys/directsound/gstdirectsoundsink.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/directsound/gstdirectsoundsink.c b/sys/directsound/gstdirectsoundsink.c index a4f0bded8..6f05d8041 100644 --- a/sys/directsound/gstdirectsoundsink.c +++ b/sys/directsound/gstdirectsoundsink.c @@ -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))) { |