[corsix-th] 01/02: backport upstream patch to build with ffmpeg 3.0

Phil Morrell emorrp1-guest at moszumanska.debian.org
Mon Apr 18 18:29:46 UTC 2016


This is an automated email from the git hooks/post-receive script.

emorrp1-guest pushed a commit to branch master
in repository corsix-th.

commit 01ac1b5c6205259f7e62a22a90e5a4ca12bb69c7
Author: Phil Morrell <debian at emorrp1.name>
Date:   Mon Apr 18 18:51:50 2016 +0100

    backport upstream patch to build with ffmpeg 3.0
    
    s/nullptr/NULL/g, quilt refresh, DEP3
    Closes: #821415
---
 debian/patches/series                              |  1 +
 debian/patches/use-AVPixelFormat-and-related.patch | 65 ++++++++++++++++++++++
 2 files changed, 66 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 5b08616..9a51f49 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 lua.patch
 fix-parameters-to-sws_scale.patch
 default_config.patch
+use-AVPixelFormat-and-related.patch
diff --git a/debian/patches/use-AVPixelFormat-and-related.patch b/debian/patches/use-AVPixelFormat-and-related.patch
new file mode 100644
index 0000000..4c91c0a
--- /dev/null
+++ b/debian/patches/use-AVPixelFormat-and-related.patch
@@ -0,0 +1,65 @@
+Author: "Stephen E. Baker" <baker.stephen.e at gmail.com>
+Subject: Use AVPixelFormat and related
+Origin: backport, commit:9260930
+Bug: https://github.com/CorsixTH/CorsixTH/issues/1042
+Bug-Debian: https://bugs.debian.org/821415
+Reviewed-by: Phil Morrell <debian at emorrp1.name>
+Forwarded: not-needed
+Applied-Upstream: v0.60-beta1, commit:9260930
+Last-Update: 2016-04-18
+
+Non AV prefixed PixelFormat and PIX_FMT_* enums have been deprecated for years.
+They have been removed in git for both libav and ffmpeg. This patch uses the
+newer replacements while retaining compatibility for old ffmpeg and libav
+versions.
+
+backport: s/nullptr/NULL/g, quilt refresh, DEP3
+---
+ CorsixTH/Src/th_movie.cpp | 4 ++--
+ CorsixTH/Src/th_movie.h   | 8 +++++++-
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+--- a/CorsixTH/Src/th_movie.cpp
++++ b/CorsixTH/Src/th_movie.cpp
+@@ -69,7 +69,7 @@
+ 
+ THMoviePicture::THMoviePicture():
+     m_pTexture(NULL),
+-    m_pixelFormat(PIX_FMT_RGB24)
++    m_pixelFormat(AV_PIX_FMT_RGB24)
+ {
+     m_pMutex = SDL_CreateMutex();
+     m_pCond = SDL_CreateCond();
+@@ -270,7 +270,7 @@
+ 
+     if(pMoviePicture->m_pTexture)
+     {
+-        m_pSwsContext = sws_getCachedContext(m_pSwsContext, pFrame->width, pFrame->height, (PixelFormat)pFrame->format, pMoviePicture->m_iWidth, pMoviePicture->m_iHeight, pMoviePicture->m_pixelFormat, SWS_BICUBIC, NULL, NULL, NULL);
++        m_pSwsContext = sws_getCachedContext(m_pSwsContext, pFrame->width, pFrame->height, (AVPixelFormat)pFrame->format, pMoviePicture->m_iWidth, pMoviePicture->m_iHeight, pMoviePicture->m_pixelFormat, SWS_BICUBIC, NULL, NULL, NULL);
+         if(m_pSwsContext == NULL)
+         {
+             SDL_UnlockMutex(m_aPictureQueue[m_iWriteIndex].m_pMutex);
+--- a/CorsixTH/Src/th_movie.h
++++ b/CorsixTH/Src/th_movie.h
+@@ -48,6 +48,12 @@
+ #endif
+ }
+ 
++#if (defined(CORSIX_TH_USE_FFMEPG) && LIBAVUTIL_VERSION_INT < AV_VERSION_INT(51, 74, 100)) || \
++    (defined(CORSIX_TH_USE_LIBAV) && LIBAVUTIL_VERSION_INT < AV_VERSION_INT(51, 42, 0))
++#define AVPixelFormat PixelFormat
++#define AV_PIX_FMT_RBG24 PIX_FMT_RGB24
++#endif
++
+ struct SDL_Renderer;
+ struct SDL_Texture;
+ struct SDL_Window;
+@@ -66,7 +72,7 @@
+     void draw(SDL_Renderer *pRenderer);
+ 
+     SDL_Texture *m_pTexture;
+-    PixelFormat m_pixelFormat;
++    AVPixelFormat m_pixelFormat;
+     int m_iX, m_iY, m_iWidth, m_iHeight;
+     double m_dPts;
+     SDL_mutex *m_pMutex;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/corsix-th.git



More information about the Pkg-games-commits mailing list