From 405c75998d5dc2a700362ec1163133c67cf361c5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 14 Feb 2022 20:20:47 +0100 Subject: [PATCH] avcodec/movtextdec: add () to CMP() macro to avoid unexpected behavior Reviewed-by: Andreas Rheinhardt Signed-off-by: Michael Niedermayer (cherry picked from commit c182c706589de2b513331c61a8597fa863d4e97f) Signed-off-by: Michael Niedermayer --- libavcodec/movtextdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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