diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-06-26 15:52:00 -0700 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-09-26 19:26:28 +0200 |
commit | 47be9f5bd50e9c388adca6f8991cde7b4612db56 (patch) | |
tree | f1907debf7da53f97f6b23188c5381dd037eeef9 | |
parent | 20ca827019a72bfacb38e73d0b8590e651818272 (diff) | |
download | ffmpeg-47be9f5bd50e9c388adca6f8991cde7b4612db56.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.
(cherry picked from commit 0d994b2f45c08794899057ee7ca54f48218c0a53)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-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 8fad257ddf..dc92cddff5 100644 --- a/libswscale/x86/swscale_template.c +++ b/libswscale/x86/swscale_template.c @@ -2203,7 +2203,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 ); |