[vlc-commits] mmdevice: improve diagnostics
Rémi Denis-Courmont
git at videolan.org
Sat Mar 1 12:34:06 CET 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 1 12:16:04 2014 +0200| [54536c58b87d08a851a64bfda2f4718b459a816d] | committer: Rémi Denis-Courmont
mmdevice: improve diagnostics
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=54536c58b87d08a851a64bfda2f4718b459a816d
---
modules/audio_output/mmdevice.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index 4e114b3..c84aa01 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -704,6 +704,9 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
{
msg_Dbg(aout, "using selected device %ls", sys->device);
hr = IMMDeviceEnumerator_GetDevice(it, sys->device, &sys->dev);
+ if (FAILED(hr))
+ msg_Err(aout, "cannot get selected device %ls (error 0x%lx)",
+ sys->device, hr);
free(sys->device);
}
else
@@ -715,6 +718,8 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
msg_Dbg(aout, "using default device");
hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(it, eRender,
eConsole, &sys->dev);
+ if (FAILED(hr))
+ msg_Err(aout, "cannot get default device (error 0x%lx)", hr);
}
sys->device = NULL;
@@ -738,7 +743,7 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
}
else
{
- msg_Err(aout, "cannot get device (error 0x%lx)", hr);
+ msg_Err(aout, "cannot get device identifier (error 0x%lx)", hr);
return hr;
}
More information about the vlc-commits
mailing list