[dolphin-emu] 02/02: Fix FTBFS with FFmpeg 2.9

James Cowgill jcowgill-guest at moszumanska.debian.org
Mon Nov 2 23:10:00 UTC 2015


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

jcowgill-guest pushed a commit to branch master
in repository dolphin-emu.

commit 9d406b53dd51fee64001586707b0c6eb31cc44b8
Author: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
Date:   Mon Nov 2 23:01:50 2015 +0000

    Fix FTBFS with FFmpeg 2.9
---
 debian/patches/11_ffmpeg_2.9.patch | 55 ++++++++++++++++++++++++++++++++++++++
 debian/patches/series              |  1 +
 2 files changed, 56 insertions(+)

diff --git a/debian/patches/11_ffmpeg_2.9.patch b/debian/patches/11_ffmpeg_2.9.patch
new file mode 100644
index 0000000..c8f9d43
--- /dev/null
+++ b/debian/patches/11_ffmpeg_2.9.patch
@@ -0,0 +1,55 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
+Last-Update: <2015-11-02>
+
+--- dolphin-emu-4.0.2+dfsg.orig/Source/Core/VideoCommon/Src/AVIDump.cpp
++++ dolphin-emu-4.0.2+dfsg/Source/Core/VideoCommon/Src/AVIDump.cpp
+@@ -306,7 +306,7 @@ bool AVIDump::CreateFile()
+ 	s_Stream->codec->height = s_height;
+ 	s_Stream->codec->time_base = (AVRational){1, static_cast<int>(VideoInterface::TargetRefreshRate)};
+ 	s_Stream->codec->gop_size = 12;
+-	s_Stream->codec->pix_fmt = g_Config.bUseFFV1 ? PIX_FMT_BGRA : PIX_FMT_YUV420P;
++	s_Stream->codec->pix_fmt = g_Config.bUseFFV1 ? AV_PIX_FMT_BGRA : AV_PIX_FMT_YUV420P;
+ 
+ 	if (!(codec = avcodec_find_encoder(s_Stream->codec->codec_id)) ||
+ 			(avcodec_open2(s_Stream->codec, codec, NULL) < 0))
+@@ -315,8 +315,8 @@ bool AVIDump::CreateFile()
+ 		return false;
+ 	}
+ 
+-	s_BGRFrame = avcodec_alloc_frame();
+-	s_YUVFrame = avcodec_alloc_frame();
++	s_BGRFrame = av_frame_alloc();
++	s_YUVFrame = av_frame_alloc();
+ 
+ 	s_size = avpicture_get_size(s_Stream->codec->pix_fmt, s_width, s_height);
+ 
+@@ -340,12 +340,12 @@ bool AVIDump::CreateFile()
+ 
+ void AVIDump::AddFrame(const u8* data, int width, int height)
+ {
+-	avpicture_fill((AVPicture *)s_BGRFrame, const_cast<u8*>(data), PIX_FMT_BGR24, width, height);
++	avpicture_fill((AVPicture *)s_BGRFrame, const_cast<u8*>(data), AV_PIX_FMT_BGR24, width, height);
+ 
+ 	// Convert image from BGR24 to desired pixel format, and scale to initial
+ 	// width and height
+ 	struct SwsContext *s_SwsContext;
+-	if ((s_SwsContext = sws_getContext(width, height, PIX_FMT_BGR24, s_width, s_height,
++	if ((s_SwsContext = sws_getContext(width, height, AV_PIX_FMT_BGR24, s_width, s_height,
+ 					s_Stream->codec->pix_fmt, SWS_BICUBIC, NULL, NULL, NULL)))
+ 	{
+ 		sws_scale(s_SwsContext, s_BGRFrame->data, s_BGRFrame->linesize, 0,
+@@ -403,11 +403,11 @@ void AVIDump::CloseFile()
+ 	s_OutBuffer = NULL;
+ 
+ 	if (s_BGRFrame)
+-		av_free(s_BGRFrame);
++		av_frame_free(&s_BGRFrame);
+ 	s_BGRFrame = NULL;
+ 
+ 	if (s_YUVFrame)
+-		av_free(s_YUVFrame);
++		av_frame_free(&s_YUVFrame);
+ 	s_YUVFrame = NULL;
+ 
+ 	if (s_FormatContext)
diff --git a/debian/patches/series b/debian/patches/series
index 1c9a272..8c8db18 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@
 08_sfml-use-2.1.patch
 09_arm-use-gl.patch
 10_include_findx11.patch
+11_ffmpeg_2.9.patch

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



More information about the Pkg-games-commits mailing list