diff options
author | Michael Niedermayer | 2015-09-10 17:03:11 +0200 |
---|---|---|
committer | Michael Niedermayer | 2015-09-10 17:05:20 +0200 |
commit | 21c7272859134734c6bda17ae0e973b23f20694d (patch) | |
tree | ef3af9452b7e09d831cf52e2f31e7bcadeff1e1d /libswscale | |
parent | a4d17c9a706b2219c30657ce4d004337903a6c69 (diff) |
swscale/utils: Forward luma range to the cascaded context for alphablending
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/utils.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 450d0d55df..5265157d3e 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1500,11 +1500,18 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, if (ret < 0) return ret; - c->cascaded_context[1] = sws_getContext(srcW, srcH, tmpFormat, - dstW, dstH, dstFormat, - flags, srcFilter, dstFilter, c->param); + c->cascaded_context[1] = sws_alloc_set_opts(srcW, srcH, tmpFormat, + dstW, dstH, dstFormat, + flags, c->param); if (!c->cascaded_context[1]) return -1; + + c->cascaded_context[1]->srcRange = c->srcRange; + c->cascaded_context[1]->dstRange = c->dstRange; + ret = sws_init_context(c->cascaded_context[1], srcFilter , dstFilter); + if (ret < 0) + return ret; + return 0; } } |