[corsix-th] 01/01: copy patch used by ArchLinux to avoid segfault in videos
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Sun Dec 6 20:56:05 UTC 2015
This is an automated email from the git hooks/post-receive script.
detiste-guest pushed a commit to branch master
in repository corsix-th.
commit 5cb47f0a54a52f29bccf5d5c889d8d0b01c91ed3
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Sun Dec 6 21:55:04 2015 +0100
copy patch used by ArchLinux to avoid segfault in videos
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=corsix-th
---
debian/patches/fix-parameters-to-sws_scale.patch | 18 ++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 19 insertions(+)
diff --git a/debian/patches/fix-parameters-to-sws_scale.patch b/debian/patches/fix-parameters-to-sws_scale.patch
new file mode 100644
index 0000000..d3bbee3
--- /dev/null
+++ b/debian/patches/fix-parameters-to-sws_scale.patch
@@ -0,0 +1,18 @@
+Subject: Fix parameters to sws_scale
+Author: "Stephen E. Baker" <baker.stephen.e at gmail.com>
+From: 4ae56e100911c1763cb9fd9a4b8647e323ecc032
+Last-Update: Wed, 18 Nov 2015 21:16:33 -0500
+
+Was passing destination height instead of source height, leading to segfaults
+
+--- a/CorsixTH/Src/th_movie.cpp
++++ b/CorsixTH/Src/th_movie.cpp
+@@ -283,7 +283,7 @@ int THMoviePictureBuffer::write(AVFrame* pFrame, double dPts)
+ avpicture_fill((AVPicture *)pFrameRGB, buffer, pMoviePicture->m_pixelFormat, pMoviePicture->m_iWidth, pMoviePicture->m_iHeight);
+
+ /* Rescale the frame data and convert it to RGB24. */
+- sws_scale(m_pSwsContext, pFrame->data, pFrame->linesize, 0, pMoviePicture->m_iHeight, pFrameRGB->data, pFrameRGB->linesize);
++ sws_scale(m_pSwsContext, pFrame->data, pFrame->linesize, 0, pFrame->height, pFrameRGB->data, pFrameRGB->linesize);
+
+ /* Upload it to the texture we render from - note that this works because our OpenGL context shares texture namespace with the main threads' context. */
+ SDL_UpdateTexture(pMoviePicture->m_pTexture, nullptr, buffer, pMoviePicture->m_iWidth * 3);
diff --git a/debian/patches/series b/debian/patches/series
index 5e89c45..cd7b0ae 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
lua.patch
+fix-parameters-to-sws_scale.patch
--
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