Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | From 6fa8a4a9bb64ff34328aae46acd600f8502b2c05 Mon Sep 17 00:00:00 2001 |
| 2 | From: Jean-Baptiste Kempf <jb@videolan.org> |
| 3 | Date: Mon, 31 Aug 2015 09:07:39 +0200 |
| 4 | Subject: [PATCH] SWSCALE: fix compilation with 4.x |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
| 9 | (cherry picked from commit 2b23857c68622edda76b72b74aeb3d943ee277c9) |
| 10 | Signed-off-by: Rafaël Carré <funman@videolan.org> |
| 11 | --- |
| 12 | modules/video_chroma/swscale.c | 3 +++ |
| 13 | 1 file changed, 3 insertions(+) |
| 14 | |
| 15 | diff --git a/modules/video_chroma/swscale.c b/modules/video_chroma/swscale.c |
| 16 | index 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 | -- |
| 44 | 2.5.0 |
| 45 | |