Package: dolphin-emu Version: 4.0.2+dfsg2-1 Severity: important Tags: patch User: [email protected] Usertags: ffmpeg2.9
Dear Maintainer, your package fails to build with the upcoming ffmpeg 2.9. This bug will become release-critical at some point when the ffmpeg2.9 transition gets closer. Attached is a patch replacing the deprecated functionality. It also works with ffmpeg 2.8. Please apply this patch and forward it upstream, if necessary. These changes have little regression potential. Best regards, Andreas
diff --git a/debian/patches/ffmpeg_2.9.patch b/debian/patches/ffmpeg_2.9.patch new file mode 100644 index 0000000..c69c6a4 --- /dev/null +++ b/debian/patches/ffmpeg_2.9.patch @@ -0,0 +1,55 @@ +Description: Replace deprecated FFmpeg API +Author: Andreas Cadhalpun <[email protected]> +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..78f7e5d 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 +ffmpeg_2.9.patch

