Commit 0d994b2f authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Ronald Bultje
Browse files

swscale: don't use planar output functions to write to NV12/21.

This prevents a crash when converting to NV12/21 without the bitexact
flags enabled.
parent 8683c6a6
......@@ -2202,7 +2202,8 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c)
enum PixelFormat srcFormat = c->srcFormat,
dstFormat = c->dstFormat;
if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat)) {
if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) &&
dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21) {
if (!(c->flags & SWS_BITEXACT)) {
if (c->flags & SWS_ACCURATE_RND) {
c->yuv2yuv1 = RENAME(yuv2yuv1_ar );
......
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