- fix building with ffmpeg 3 auto/th/vcmi-0.98-3
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 29 Mar 2016 00:42:07 +0000 (02:42 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 29 Mar 2016 00:42:07 +0000 (02:42 +0200)
- rel 3

ffmpeg3.patch [new file with mode: 0644]
vcmi.spec

diff --git a/ffmpeg3.patch b/ffmpeg3.patch
new file mode 100644 (file)
index 0000000..919d31e
--- /dev/null
@@ -0,0 +1,52 @@
+diff -ur vcmi-0.98.orig/client/CVideoHandler.cpp vcmi-0.98/client/CVideoHandler.cpp
+--- vcmi-0.98.orig/client/CVideoHandler.cpp    2015-04-01 09:34:22.000000000 +0200
++++ vcmi-0.98/client/CVideoHandler.cpp 2016-03-29 01:45:43.689696331 +0200
+@@ -155,7 +155,7 @@
+       }\r
\r
+       // Allocate video frame\r
+-      frame = avcodec_alloc_frame();\r
++      frame = av_frame_alloc();\r
+       \r
+       //setup scaling\r
+       \r
+@@ -201,21 +201,21 @@
+ #endif\r
+       { // Convert the image into YUV format that SDL uses\r
+               sws = sws_getContext(codecContext->width, codecContext->height, codecContext->pix_fmt, \r
+-                                                       pos.w, pos.h, PIX_FMT_YUV420P, \r
++                                                       pos.w, pos.h, AV_PIX_FMT_YUV420P, \r
+                                                        SWS_BICUBIC, nullptr, nullptr, nullptr);\r
+       }\r
+       else\r
+       {\r
\r
+-              PixelFormat screenFormat = PIX_FMT_NONE;\r
++              AVPixelFormat screenFormat = AV_PIX_FMT_NONE;\r
+               if (screen->format->Bshift > screen->format->Rshift)\r
+               {\r
+                       // this a BGR surface\r
+                       switch (screen->format->BytesPerPixel)\r
+                       {\r
+-                              case 2: screenFormat = PIX_FMT_BGR565; break;\r
+-                              case 3: screenFormat = PIX_FMT_BGR24; break;\r
+-                              case 4: screenFormat = PIX_FMT_BGR32; break;\r
++                              case 2: screenFormat = AV_PIX_FMT_BGR565; break;\r
++                              case 3: screenFormat = AV_PIX_FMT_BGR24; break;\r
++                              case 4: screenFormat = AV_PIX_FMT_BGR32; break;\r
+                               default: return false;\r
+                       }\r
+               }\r
+@@ -224,9 +224,9 @@
+                       // this a RGB surface\r
+                       switch (screen->format->BytesPerPixel)\r
+                       {\r
+-                              case 2: screenFormat = PIX_FMT_RGB565; break;\r
+-                              case 3: screenFormat = PIX_FMT_RGB24; break;\r
+-                              case 4: screenFormat = PIX_FMT_RGB32; break;\r
++                              case 2: screenFormat = AV_PIX_FMT_RGB565; break;\r
++                              case 3: screenFormat = AV_PIX_FMT_RGB24; break;\r
++                              case 4: screenFormat = AV_PIX_FMT_RGB32; break;\r
+                               default: return false;\r
+                       }\r
+               }\r
index c527fc7e9e10f280577f6a326cdd4c91ce2382ba..5f8640bd51bc0ba2ca523b8961b2d1919211ffb7 100644 (file)
--- a/vcmi.spec
+++ b/vcmi.spec
@@ -1,7 +1,7 @@
 Summary:       Heroes 3: WoG recreated
 Name:          vcmi
 Version:       0.98
-Release:       2
+Release:       3
 License:       GPL v2+
 Group:         X11/Applications/Games
 Source0:       https://github.com/vcmi/vcmi/archive/%{version}/%{name}-%{version}.tar.gz
@@ -9,6 +9,7 @@ Source0:        https://github.com/vcmi/vcmi/archive/%{version}/%{name}-%{version}.tar.
 Source1:       http://download.vcmi.eu/core.zip
 # Source1-md5: 5cf75d588cc53b93aceb809a6068ae37
 Patch0:                boost-1.58.patch
+Patch1:                ffmpeg3.patch
 URL:           http://www.vcmi.eu/
 BuildRequires: Qt5Network-devel
 BuildRequires: qt5-build
@@ -36,6 +37,7 @@ H3 engine rewrie (not another mod) with new possibilities.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 install -d build
This page took 0.169168 seconds and 4 git commands to generate.