From 0fc11e7bad7190080dc75aaec82ee66f4037359d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 14 Jul 2013 03:33:48 +0200 Subject: [PATCH] swscale: make handle_formats() safe to be called multiple times Signed-off-by: Michael Niedermayer --- libswscale/utils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index 5c40f00747..2e89a2d992 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1043,10 +1043,10 @@ static int handle_xyz(enum AVPixelFormat *format) static void handle_formats(SwsContext *c) { - c->src0Alpha = handle_0alpha(&c->srcFormat); - c->dst0Alpha = handle_0alpha(&c->dstFormat); - c->srcXYZ = handle_xyz(&c->srcFormat); - c->dstXYZ = handle_xyz(&c->dstFormat); + c->src0Alpha |= handle_0alpha(&c->srcFormat); + c->dst0Alpha |= handle_0alpha(&c->dstFormat); + c->srcXYZ |= handle_xyz(&c->srcFormat); + c->dstXYZ |= handle_xyz(&c->dstFormat); } SwsContext *sws_alloc_context(void)