swscale/utils: Forward luma range to the cascaded context for alphablending
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a4d17c9a70
commit
21c7272859
@ -1500,11 +1500,18 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
c->cascaded_context[1] = sws_getContext(srcW, srcH, tmpFormat,
|
c->cascaded_context[1] = sws_alloc_set_opts(srcW, srcH, tmpFormat,
|
||||||
dstW, dstH, dstFormat,
|
dstW, dstH, dstFormat,
|
||||||
flags, srcFilter, dstFilter, c->param);
|
flags, c->param);
|
||||||
if (!c->cascaded_context[1])
|
if (!c->cascaded_context[1])
|
||||||
return -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;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user