The calculation of abase depends on the variable needAlpha, but one can
safely calculate and set the abase variable even though it isn't used.
---
libswscale/yuv2rgb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
index f1ce4aa..416e3c4 100644
--- a/libswscale/yuv2rgb.c
+++ b/libswscale/yuv2rgb.c
@@ -862,8 +862,7 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const
int inv_table[4],
gbase = base + 8;
bbase = base + (isRgb ? 0 : 16);
needAlpha = CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat);
- if (!needAlpha)
- abase = (base + 24) & 31;
+ abase = (base + 24) & 31;
c->yuvTable = av_malloc(1024 * 3 * 4);
y_table32 = c->yuvTable;
yb = -(384 << 16) - oy;
--
1.7.9.5
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel