]> git.sesse.net Git - vlc/commitdiff
DirectSound: only list usable devices
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 15 Aug 2013 18:10:18 +0000 (20:10 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 15 Aug 2013 18:10:43 +0000 (20:10 +0200)
Ref #9104

modules/audio_output/directx.c

index 04dc919dfd0d002ebcb9bbb3fe12c6ec32b9d6b6..ec6504ce3c5ffc7e0b0884e53c81b42e5d3a5772 100644 (file)
@@ -765,7 +765,8 @@ static int CALLBACK DeviceEnumCallback( LPGUID guid, LPCWSTR desc,
     ds_list_t *list = data;
     OLECHAR buf[48];
 
-    StringFromGUID2( guid, buf, 48 );
+    if( StringFromGUID2( guid, buf, 48 ) <= 0 )
+        return true;
 
     list->count++;
     list->ids = xrealloc( list->ids, list->count * sizeof(char *) );