blob: 56744e7de8ed9b83d563c90227d6135671a91682 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From 6fa8a4a9bb64ff34328aae46acd600f8502b2c05 Mon Sep 17 00:00:00 2001
2From: Jean-Baptiste Kempf <jb@videolan.org>
3Date: Mon, 31 Aug 2015 09:07:39 +0200
4Subject: [PATCH] SWSCALE: fix compilation with 4.x
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9(cherry picked from commit 2b23857c68622edda76b72b74aeb3d943ee277c9)
10Signed-off-by: Rafaël Carré <funman@videolan.org>
11---
12 modules/video_chroma/swscale.c | 3 +++
13 1 file changed, 3 insertions(+)
14
15diff --git a/modules/video_chroma/swscale.c b/modules/video_chroma/swscale.c
16index 4e0ecf1..26d0d6f 100644
17--- a/modules/video_chroma/swscale.c
18+++ b/modules/video_chroma/swscale.c
19@@ -36,6 +36,7 @@
20 #include <vlc_cpu.h>
21
22 #include <libswscale/swscale.h>
23+#include <libswscale/version.h>
24
25 #ifdef __APPLE__
26 # include <TargetConditionals.h>
27@@ -235,6 +236,7 @@ static int GetSwsCpuMask(void)
28 {
29 int i_sws_cpu = 0;
30
31+#if LIBSWSCALE_VERSION_MAJOR < 4
32 #if defined(__i386__) || defined(__x86_64__)
33 if( vlc_CPU_MMX() )
34 i_sws_cpu |= SWS_CPU_CAPS_MMX;
35@@ -248,6 +250,7 @@ static int GetSwsCpuMask(void)
36 if( vlc_CPU_ALTIVEC() )
37 i_sws_cpu |= SWS_CPU_CAPS_ALTIVEC;
38 #endif
39+#endif
40
41 return i_sws_cpu;
42 }
43--
442.5.0
45