diff mbox

[FFmpeg-devel,2/4] lavc/libaribb24: protect handled value with parenthesis in RGB_TO_BGR

Message ID 20190211010654.24762-2-jeebjp@gmail.com
State Accepted
Commit 03824afdb4a5ad25c18775b6992bb3959eb82d85
Headers show

Commit Message

Jan Ekström Feb. 11, 2019, 1:06 a.m. UTC
---
 libavcodec/libaribb24.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Feb. 12, 2019, 12:14 a.m. UTC | #1
On Mon, Feb 11, 2019 at 03:06:52AM +0200, Jan Ekström wrote:
> ---
>  libavcodec/libaribb24.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

LGTM

thx

[...]
diff mbox

Patch

diff --git a/libavcodec/libaribb24.c b/libavcodec/libaribb24.c
index d6cccd117b..43da2b675d 100644
--- a/libavcodec/libaribb24.c
+++ b/libavcodec/libaribb24.c
@@ -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)
 {