summaryrefslogtreecommitdiff
path: root/libavutil/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/internal.h')
-rw-r--r--libavutil/internal.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 36d3e719f6..4c98a1299f 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -210,4 +210,15 @@
type ff_##name args
#endif
+/**
+ * Returns NULL if a threading library has not been enabled.
+ * Used to disable threading functions in AVCodec definitions
+ * when not needed.
+ */
+#if HAVE_THREADS
+# define ONLY_IF_THREADS_ENABLED(x) x
+#else
+# define ONLY_IF_THREADS_ENABLED(x) NULL
+#endif
+
#endif /* AVUTIL_INTERNAL_H */