From 9b5fe81d019af9e98132ebc207f4d7ca661896e4 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sun, 3 Apr 2022 22:08:51 +0900 Subject: [PATCH] nvencoder: Fix operator overloading GUID equality check was inverted Part-of: --- subprojects/gst-plugins-bad/sys/nvcodec/gstnvencoder.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvencoder.h b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvencoder.h index baaca93505..f271847d5d 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvencoder.h +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvencoder.h @@ -157,7 +157,7 @@ G_END_DECLS #ifndef G_OS_WIN32 inline bool is_equal_guid(const GUID & lhs, const GUID & rhs) { - return !!memcmp(&lhs, &rhs, sizeof (GUID)); + return memcmp(&lhs, &rhs, sizeof (GUID)) == 0; } inline bool operator==(const GUID & lhs, const GUID & rhs) @@ -167,7 +167,7 @@ inline bool operator==(const GUID & lhs, const GUID & rhs) inline bool operator!=(const GUID & lhs, const GUID & rhs) { - return !(lhs == rhs); + return !is_equal_guid(lhs, rhs); } #endif /* G_OS_WIN32 */ -#endif /* __cplusplus */ \ No newline at end of file +#endif /* __cplusplus */