Package: vcmi Version: 0.98+dfsg-2 Severity: important Tags: patch User: pkg-multimedia-maintain...@lists.alioth.debian.org 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..09c94f3 --- /dev/null +++ b/debian/patches/ffmpeg_2.9.patch @@ -0,0 +1,64 @@ +Description: Replace deprecated FFmpeg API +Author: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> +Last-Update: <2015-11-02> + +--- vcmi-0.98+dfsg.orig/client/CVideoHandler.cpp ++++ vcmi-0.98+dfsg/client/CVideoHandler.cpp +@@ -155,7 +155,7 @@ bool CVideoPlayer::open(std::string fnam + } + + // Allocate video frame +- frame = avcodec_alloc_frame(); ++ frame = av_frame_alloc(); + + //setup scaling + +@@ -201,21 +201,21 @@ bool CVideoPlayer::open(std::string fnam + #endif + { // Convert the image into YUV format that SDL uses + sws = sws_getContext(codecContext->width, codecContext->height, codecContext->pix_fmt, +- pos.w, pos.h, PIX_FMT_YUV420P, ++ pos.w, pos.h, AV_PIX_FMT_YUV420P, + SWS_BICUBIC, nullptr, nullptr, nullptr); + } + else + { + +- PixelFormat screenFormat = PIX_FMT_NONE; ++ AVPixelFormat screenFormat = AV_PIX_FMT_NONE; + if (screen->format->Bshift > screen->format->Rshift) + { + // this a BGR surface + switch (screen->format->BytesPerPixel) + { +- case 2: screenFormat = PIX_FMT_BGR565; break; +- case 3: screenFormat = PIX_FMT_BGR24; break; +- case 4: screenFormat = PIX_FMT_BGR32; break; ++ case 2: screenFormat = AV_PIX_FMT_BGR565; break; ++ case 3: screenFormat = AV_PIX_FMT_BGR24; break; ++ case 4: screenFormat = AV_PIX_FMT_BGR32; break; + default: return false; + } + } +@@ -224,9 +224,9 @@ bool CVideoPlayer::open(std::string fnam + // this a RGB surface + switch (screen->format->BytesPerPixel) + { +- case 2: screenFormat = PIX_FMT_RGB565; break; +- case 3: screenFormat = PIX_FMT_RGB24; break; +- case 4: screenFormat = PIX_FMT_RGB32; break; ++ case 2: screenFormat = AV_PIX_FMT_RGB565; break; ++ case 3: screenFormat = AV_PIX_FMT_RGB24; break; ++ case 4: screenFormat = AV_PIX_FMT_RGB32; break; + default: return false; + } + } +@@ -411,7 +411,7 @@ void CVideoPlayer::close() + + if (frame) + { +- av_free(frame); ++ av_frame_free(&frame); + frame = nullptr; + } + diff --git a/debian/patches/series b/debian/patches/series index 31acd96..cf289da 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ disable-privacy-breach +ffmpeg_2.9.patch