Frame-based multithreading framework using pthreads
[ffmpeg.git] / libavutil / internal.h
index 36d3e71..4c98a12 100644 (file)
     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 */