]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
Add a md5 computation test
[vlc] / include / vlc_common.h
index 791762fabdbb36d72226c6502394e5b3b829e53d..92eb50ce988980e685cee888502b3a3e33992056 100644 (file)
@@ -579,6 +579,9 @@ VLC_API void vlc_release(gc_object_t *);
 #   define __MIN(a, b)   ( ((a) < (b)) ? (a) : (b) )
 #endif
 
+/* clip v in [min, max] */
+#define VLC_CLIP(v, min, max)    __MIN(__MAX((v), (min)), (max))
+
 VLC_USED
 static inline int64_t GCD ( int64_t a, int64_t b )
 {