[vlc-devel] [PATCH 1/2] posix/thread: dont try to read nonexistent variable
Marvin Scholz
epirat07 at gmail.com
Mon Mar 30 14:37:03 CEST 2020
When LIBVLC_USE_PTHREAD is not defined, there is no 'rt-priority' var,
so do not try to read it in that case.
---
src/posix/thread.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/posix/thread.c b/src/posix/thread.c
index e34725c7f1..57fb13fd8a 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -172,11 +172,15 @@ void vlc_threads_setup (libvlc_int_t *p_libvlc)
* just once per process. */
if (!initialized)
{
+#if defined (LIBVLC_USE_PTHREAD)
if (var_InheritBool (p_libvlc, "rt-priority"))
{
rt_offset = var_InheritInteger (p_libvlc, "rt-offset");
rt_priorities = true;
}
+#else
+ (void)rt_priorities; (void)rt_offset; (void)p_libvlc;
+#endif
initialized = true;
}
vlc_mutex_unlock (&lock);
--
2.24.1 (Apple Git-126)
More information about the vlc-devel
mailing list