aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-02-14 20:20:47 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2022-02-25 22:23:03 +0100
commitc182c706589de2b513331c61a8597fa863d4e97f (patch)
tree078e708c3558ce2fecc430ce0664ee44d4581899
parent36680078ca3302496d9b0b8a8d7168ce9eabb2bc (diff)
downloadffmpeg-c182c706589de2b513331c61a8597fa863d4e97f.tar.gz
avcodec/movtextdec: add () to CMP() macro to avoid unexpected behavior
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/movtextdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 825632ca9b..dc30fdc698 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -263,7 +263,7 @@ static int decode_hclr(const uint8_t *tsmb, MovTextContext *m, uint64_t size)
static int styles_equivalent(const StyleBox *a, const StyleBox *b)
{
-#define CMP(field) a->field == b->field
+#define CMP(field) ((a)->field == (b)->field)
return CMP(bold) && CMP(italic) && CMP(underline) && CMP(color) &&
CMP(alpha) && CMP(fontsize) && CMP(font_id);
#undef CMP