Package: corsix-th
Followup-For: Bug #1013420
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch
Control: tags -1 patch
Upstream has committed a fix for this issue. Please find attached a debdiff
that cherry-picks this fix and lets corsix-th build against ffmpeg 5.0.
I have uploaded this change to Ubuntu for the ffmpeg 5.0 transition.
Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
slanga...@ubuntu.com vor...@debian.org
diff -Nru corsix-th-0.65.1/debian/control corsix-th-0.65.1/debian/control
--- corsix-th-0.65.1/debian/control 2022-07-19 05:45:58.0 -0700
+++ corsix-th-0.65.1/debian/control 2022-07-21 10:46:54.0 -0700
@@ -1,8 +1,7 @@
Source: corsix-th
Section: contrib/games
Priority: optional
-Maintainer: Ubuntu Developers
-XSBC-Original-Maintainer: Debian Games Team
+Maintainer: Debian Games Team
Uploaders:
Alexandre Detiste ,
Phil Morrell ,
diff -Nru corsix-th-0.65.1/debian/patches/0001-Support-ffmpeg-5.patch
corsix-th-0.65.1/debian/patches/0001-Support-ffmpeg-5.patch
--- corsix-th-0.65.1/debian/patches/0001-Support-ffmpeg-5.patch 1969-12-31
16:00:00.0 -0800
+++ corsix-th-0.65.1/debian/patches/0001-Support-ffmpeg-5.patch 2022-07-21
10:46:36.0 -0700
@@ -0,0 +1,61 @@
+From 95be4c96810818d05b668c373711cd8f38d4e8b4 Mon Sep 17 00:00:00 2001
+From: "Stephen E. Baker"
+Date: Tue, 1 Mar 2022 06:24:01 -0500
+Subject: [PATCH] Support ffmpeg 5
+
+AVCodec* was made const in lavc 59.0.100 and lavf 59.0.100
+---
+ CorsixTH/Src/th_movie.cpp | 6 +++---
+ CorsixTH/Src/th_movie.h | 8 +++-
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+Index: corsix-th-0.65.1/CorsixTH/Src/th_movie.cpp
+===
+--- corsix-th-0.65.1.orig/CorsixTH/Src/th_movie.cpp
corsix-th-0.65.1/CorsixTH/Src/th_movie.cpp
+@@ -414,8 +414,8 @@
+
+ bool movie_player::load(const char* szFilepath) {
+ int iError = 0;
+- AVCodec* m_pVideoCodec;
+- AVCodec* m_pAudioCodec;
++ av_codec_ptr m_pVideoCodec;
++ av_codec_ptr m_pAudioCodec;
+
+ unload(); // Unload any currently loaded video to free memory
+ aborting = false;
+@@ -457,7 +457,7 @@
+ }
+
+ AVCodecContext* movie_player::get_codec_context_for_stream(
+-AVCodec* codec, AVStream* stream) const {
++av_codec_ptr codec, AVStream* stream) const {
+ #if (defined(CORSIX_TH_USE_LIBAV) && \
+ LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 14, 0)) || \
+ (defined(CORSIX_TH_USE_FFMPEG) &&\
+Index: corsix-th-0.65.1/CorsixTH/Src/th_movie.h
+===
+--- corsix-th-0.65.1.orig/CorsixTH/Src/th_movie.h
corsix-th-0.65.1/CorsixTH/Src/th_movie.h
+@@ -68,6 +68,12 @@
+ #define CORSIX_TH_MOVIE_USE_SEND_PACKET_API
+ #endif
+
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 0, 100)
++using av_codec_ptr = AVCodec*;
++#else
++using av_codec_ptr = const AVCodec*;
++#endif
++
+ //! \brief Drop in replacement for AVPacketList
+ //!
+ //! AVPacketList which was deprecated with FFMpeg 4.4.
+@@ -330,7 +336,7 @@
+ 1024; ///< Buffer for audio playback
+
+ //! Get the AVCodecContext associated with a given stream
+- AVCodecContext* get_codec_context_for_stream(AVCodec* codec,
++ AVCodecContext* get_codec_context_for_stream(av_codec_ptr codec,
+AVStream* stream) const;
+
+ //! Get the time the given frame should be played (from the start of the
diff -Nru corsix-th-0.65.1/debian/patches/series
corsix-th-0.65.1/debian/patches/series
--- corsix-th-0.65.1/debian/patches/series 2021-08-29 18:48:58.0
-0700
+++ corsix-th-0.65.1/debian/patches/series 2022-07-21 10:43:46.0
-0700
@@ -1,2 +1,3 @@
default_config.patch
build-Remove-FindSDL2-find-module-use-sdl2-config.cmake-i.patch
+0001-Support-ffmpeg-5.patch