diff options
author | Niklas Haas <[email protected]> | 2025-03-06 10:37:40 +0100 |
---|---|---|
committer | Niklas Haas <[email protected]> | 2025-05-18 15:00:45 +0200 |
commit | 6072e27e9aa809d64a16e89676763e67f081b448 (patch) | |
tree | 1fe1376b846bb71123126c67308d8745f0e1210f | |
parent | d95944786e135a6e632fdf71b7d810e755a6c342 (diff) |
swscale/graph: prefer bools to ints
This is more consistent with the rest of the newly added code, which
universally switched to using bools for boolean values.
-rw-r--r-- | libswscale/format.c | 2 | ||||
-rw-r--r-- | libswscale/format.h | 6 | ||||
-rw-r--r-- | libswscale/graph.h | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/libswscale/format.c b/libswscale/format.c index b859af7b04..e4c1348b90 100644 --- a/libswscale/format.c +++ b/libswscale/format.c @@ -483,7 +483,7 @@ static int infer_trc_ref(SwsColor *csp, const SwsColor *ref) return 1; } -int ff_infer_colors(SwsColor *src, SwsColor *dst) +bool ff_infer_colors(SwsColor *src, SwsColor *dst) { int incomplete = 0; diff --git a/libswscale/format.h b/libswscale/format.h index 11b4345f7c..3b6d745159 100644 --- a/libswscale/format.h +++ b/libswscale/format.h @@ -21,6 +21,8 @@ #ifndef SWSCALE_FORMAT_H #define SWSCALE_FORMAT_H +#include <stdbool.h> + #include "libavutil/csp.h" #include "libavutil/pixdesc.h" @@ -129,7 +131,7 @@ static inline int ff_fmt_align(enum AVPixelFormat fmt) int ff_test_fmt(const SwsFormat *fmt, int output); -/* Returns 1 if the formats are incomplete, 0 otherwise */ -int ff_infer_colors(SwsColor *src, SwsColor *dst); +/* Returns true if the formats are incomplete, false otherwise */ +bool ff_infer_colors(SwsColor *src, SwsColor *dst); #endif /* SWSCALE_FORMAT_H */ diff --git a/libswscale/graph.h b/libswscale/graph.h index 6bbe87891a..0630b31ce6 100644 --- a/libswscale/graph.h +++ b/libswscale/graph.h @@ -21,6 +21,8 @@ #ifndef SWSCALE_GRAPH_H #define SWSCALE_GRAPH_H +#include <stdbool.h> + #include "libavutil/slicethread.h" #include "swscale.h" #include "format.h" @@ -109,8 +111,8 @@ typedef struct SwsGraph { SwsContext *ctx; AVSliceThread *slicethread; int num_threads; /* resolved at init() time */ - int incomplete; /* set during init() if formats had to be inferred */ - int noop; /* set during init() if the graph is a no-op */ + bool incomplete; /* set during init() if formats had to be inferred */ + bool noop; /* set during init() if the graph is a no-op */ /** Sorted sequence of filter passes to apply */ SwsPass **passes; |