summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-05-22 22:58:22 +0200
committerNirbheek Chauhan <nirbheek@centricular.com>2018-05-23 13:24:00 +0530
commit2d98a5c1d7854d5d15678945f84b2960a52f75f8 (patch)
tree0e66d3d9319b54729f0fcff44975e73af69e976c /sys
parentadb1df3bc102657b60a8400a9804b8836494a752 (diff)
wasapi: use FAILED to detect errors
S_FALSE is a valid return value which does not indicate an error. For example IAudioClient_Stop() returns S_FALSE when it is already stopped. Use the FAILED macro instead which just checks if an error occured or not. This fixes spurious warnings when using the wasapisink element. https://bugzilla.gnome.org/show_bug.cgi?id=796280
Diffstat (limited to 'sys')
-rw-r--r--sys/wasapi/gstwasapiutil.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/wasapi/gstwasapiutil.h b/sys/wasapi/gstwasapiutil.h
index ecf0ba37f..ef7a802a8 100644
--- a/sys/wasapi/gstwasapiutil.h
+++ b/sys/wasapi/gstwasapiutil.h
@@ -43,7 +43,7 @@
/* Standard error path */
#define HR_FAILED_AND(hr,func,and) \
do { \
- if (hr != S_OK) { \
+ if (FAILED (hr)) { \
gchar *msg = gst_wasapi_util_hresult_to_string (hr); \
GST_ERROR_OBJECT (self, #func " failed (%x): %s", (guint) hr, msg); \
g_free (msg); \