summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-14 03:33:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-14 03:36:19 +0200
commit0fc11e7bad7190080dc75aaec82ee66f4037359d (patch)
tree6fabae5c246e1b1814001d12c19fc1321f0244bf /libswscale
parentd5f5e5166216b861d2bfc90f2aa30b7225e8b69d (diff)
downloadffmpeg-0fc11e7bad7190080dc75aaec82ee66f4037359d.tar.gz
swscale: make handle_formats() safe to be called multiple times
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/utils.c8
1 files 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)