swscale: make handle_formats() safe to be called multiple times
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 14 Jul 2013 01:33:48 +0000 (03:33 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 14 Jul 2013 01:36:19 +0000 (03:36 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswscale/utils.c

index 5c40f00..2e89a2d 100644 (file)
@@ -1043,10 +1043,10 @@ static int handle_xyz(enum AVPixelFormat *format)
 
 static void handle_formats(SwsContext *c)
 {
 
 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)
 }
 
 SwsContext *sws_alloc_context(void)