Commit 0fc11e7b authored by Michael Niedermayer's avatar Michael Niedermayer

swscale: make handle_formats() safe to be called multiple times

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d5f5e516
...@@ -1043,10 +1043,10 @@ static int handle_xyz(enum AVPixelFormat *format) ...@@ -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->src0Alpha |= handle_0alpha(&c->srcFormat);
c->dst0Alpha = handle_0alpha(&c->dstFormat); c->dst0Alpha |= handle_0alpha(&c->dstFormat);
c->srcXYZ = handle_xyz(&c->srcFormat); c->srcXYZ |= handle_xyz(&c->srcFormat);
c->dstXYZ = handle_xyz(&c->dstFormat); c->dstXYZ |= handle_xyz(&c->dstFormat);
} }
SwsContext *sws_alloc_context(void) SwsContext *sws_alloc_context(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment