Package: ovito Version: 2.3.3+dfsg1-1 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..4e78e9a --- /dev/null +++ b/debian/patches/ffmpeg_2.9.patch @@ -0,0 +1,36 @@ +Description: Replace deprecated FFmpeg API +Author: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> +Last-Update: <2015-11-02> + +--- ovito-2.3.3+dfsg1.orig/src/3rdparty/video/VideoEncoder.cpp ++++ ovito-2.3.3+dfsg1/src/3rdparty/video/VideoEncoder.cpp +@@ -147,9 +147,9 @@ void VideoEncoder::openFile(const QStrin + _codecContext->time_base.num = 1; + _codecContext->gop_size = 12; // Emit one intra frame every twelve frames at most. + if(qstrcmp(outputFormat->name, "gif") != 0) +- _codecContext->pix_fmt = PIX_FMT_YUV420P; ++ _codecContext->pix_fmt = AV_PIX_FMT_YUV420P; + else +- _codecContext->pix_fmt = PIX_FMT_RGB24; ++ _codecContext->pix_fmt = AV_PIX_FMT_RGB24; + + /// Some formats want stream headers to be separate. + if(_formatContext->oformat->flags & AVFMT_GLOBALHEADER) +@@ -167,7 +167,7 @@ void VideoEncoder::openFile(const QStrin + throw Exception(tr("Could not open video codec: %1").arg(errorMessage(errCode))); + + // Allocate and init a YUV frame. +- _frame.reset(avcodec_alloc_frame(), &av_free); ++ _frame.reset(av_frame_alloc(), &av_free); + if(!_frame) + throw Exception(tr("Could not allocate video frame.")); + +@@ -256,7 +256,7 @@ void VideoEncoder::writeFrame(const QIma + throw Exception(tr("Frame image has wrong pixel format.")); + + // Create conversion context. +- _imgConvertCtx = sws_getCachedContext(_imgConvertCtx, videoWidth, videoHeight, PIX_FMT_BGRA, ++ _imgConvertCtx = sws_getCachedContext(_imgConvertCtx, videoWidth, videoHeight, AV_PIX_FMT_BGRA, + videoWidth, videoHeight, _codecContext->pix_fmt, SWS_BICUBIC, NULL, NULL, NULL); + if(!_imgConvertCtx) + throw Exception(tr("Cannot initialize SWS conversion context to convert video frame.")); diff --git a/debian/patches/series b/debian/patches/series index 110af2d..858e3ac 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 10_add_c+11.patch 20_disable_statisticsend_bydefault.patch +ffmpeg_2.9.patch
-- debian-science-maintainers mailing list debian-science-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers