~ubuntu-branches/ubuntu/raring/libav/raring-security

« back to all changes in this revision

Viewing changes to debian/patches/post-0.7.1/0006-swscale-don-t-use-planar-output-functions-to-write-t.patch

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2011-09-28 09:18:34 UTC
  • mfrom: (1.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20110928091834-w415mnuh06h4zpvc
Tags: 4:0.7.1-7ubuntu2
Revert "Convert package to include multiarch support."

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 47be9f5bd50e9c388adca6f8991cde7b4612db56 Mon Sep 17 00:00:00 2001
 
2
From: Ronald S. Bultje <rsbultje@gmail.com>
 
3
Date: Sun, 26 Jun 2011 15:52:00 -0700
 
4
Subject: [PATCH 06/70] swscale: don't use planar output functions to write to NV12/21.
 
5
 
 
6
This prevents a crash when converting to NV12/21 without the bitexact
 
7
flags enabled.
 
8
(cherry picked from commit 0d994b2f45c08794899057ee7ca54f48218c0a53)
 
9
 
 
10
Signed-off-by: Anton Khirnov <anton@khirnov.net>
 
11
---
 
12
 libswscale/x86/swscale_template.c |    3 ++-
 
13
 1 files changed, 2 insertions(+), 1 deletions(-)
 
14
 
 
15
diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c
 
16
index 8fad257..dc92cdd 100644
 
17
--- a/libswscale/x86/swscale_template.c
 
18
+++ b/libswscale/x86/swscale_template.c
 
19
@@ -2203,7 +2203,8 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c)
 
20
     enum PixelFormat srcFormat = c->srcFormat,
 
21
                      dstFormat = c->dstFormat;
 
22
 
 
23
-    if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat)) {
 
24
+    if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) &&
 
25
+        dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21) {
 
26
         if (!(c->flags & SWS_BITEXACT)) {
 
27
             if (c->flags & SWS_ACCURATE_RND) {
 
28
                 c->yuv2yuv1 = RENAME(yuv2yuv1_ar    );
 
29
-- 
 
30
1.7.4.1
 
31