diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-06-26 15:52:00 -0700 |
---|---|---|
committer | Ronald Bultje <rbultje@dhcp-172-22-79-135.mtv.corp.google.com> | 2011-06-27 17:15:41 -0700 |
commit | 0d994b2f45c08794899057ee7ca54f48218c0a53 (patch) | |
tree | f18c735004df0f5941120977e562ec954b80578c /libswscale | |
parent | 8683c6a638f2e323d11b520c5e130b46b1eb1eda (diff) | |
download | ffmpeg-0d994b2f45c08794899057ee7ca54f48218c0a53.tar.gz |
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.
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/x86/swscale_template.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c index 79bf2a4c8c..f6e970832d 100644 --- a/libswscale/x86/swscale_template.c +++ b/libswscale/x86/swscale_template.c @@ -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 ); |