lavc/libaribb24: protect handled value with parenthesis in RGB_TO_BGR
authorJan Ekström <jeebjp@gmail.com>
Mon, 11 Feb 2019 00:06:37 +0000 (02:06 +0200)
committerJan Ekström <jeebjp@gmail.com>
Tue, 12 Feb 2019 18:16:40 +0000 (20:16 +0200)
libavcodec/libaribb24.c

index d6cccd1..43da2b6 100644 (file)
@@ -202,7 +202,7 @@ static int libaribb24_close(AVCodecContext *avctx)
     return 0;
 }
 
-#define RGB_TO_BGR(c) ((c & 0xff) << 16 | (c & 0xff00) | ((c >> 16) & 0xff))
+#define RGB_TO_BGR(c) (((c) & 0xff) << 16 | ((c) & 0xff00) | (((c) >> 16) & 0xff))
 
 static int libaribb24_handle_regions(AVCodecContext *avctx, AVSubtitle *sub)
 {