0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00

mp_common: add MPMAX/MPMIN macros

From now on, usage of these macros is encouraged over using FFMAX and
FFMIN. FFMAX and FFMIN are perfectly fine, and the added macros are
actually exactly the same as the FFMAX and FFMIN definitions. But they
require including libavutil headers, and certain differences between
Libav and FFmpeg very often introduced breakages if these macros were
somehow not defined because a header was not recursively included.
Defining this macro on our own is the best way to escape from this
annoying issue.
This commit is contained in:
wm4 2013-07-15 23:52:47 +02:00
parent 853b468023
commit f77d243a68

View File

@ -34,6 +34,9 @@
#define ROUND(x) ((int)((x) < 0 ? (x) - 0.5 : (x) + 0.5)) #define ROUND(x) ((int)((x) < 0 ? (x) - 0.5 : (x) + 0.5))
#define MPMAX(a, b) ((a) > (b) ? (a) : (b))
#define MPMIN(a, b) ((a) > (b) ? (b) : (a))
#define CONTROL_OK 1 #define CONTROL_OK 1
#define CONTROL_TRUE 1 #define CONTROL_TRUE 1
#define CONTROL_FALSE 0 #define CONTROL_FALSE 0