]> git.sesse.net Git - ffmpeg/commitdiff
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 d6cccd117ba27c5cff2e22d0b648e3ffe9c1eaf6..43da2b675d17e4ad881fbb15e340be6fe9b0fd05 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)
 {