Browse Source

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 0d994b2f45)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n0.8.4
Ronald S. Bultje Anton Khirnov 14 years ago
parent
commit
acf2d3293c
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libswscale/x86/swscale_template.c

+ 2
- 1
libswscale/x86/swscale_template.c View File

@@ -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 );


Loading…
Cancel
Save