[ovito] 02/07: Replace deprecated FFmpeg API. (Closes: #803851)

Anton Gladky gladk at moszumanska.debian.org
Wed Dec 9 21:52:39 UTC 2015


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

gladk pushed a commit to branch master
in repository ovito.

commit 98d5ee2d4ab2a2b7cd006dc057f8af6dfe0409c2
Author: Andreas Cadhalpun <andreas.cadhalpun at googlemail.com>
Date:   Wed Dec 9 21:29:51 2015 +0100

    Replace deprecated FFmpeg API. (Closes: #803851)
---
 debian/patches/ffmpeg_2.9.patch | 39 +++++++++++++++++++++++++++++++++++++++
 debian/patches/series           |  1 +
 2 files changed, 40 insertions(+)

diff --git a/debian/patches/ffmpeg_2.9.patch b/debian/patches/ffmpeg_2.9.patch
new file mode 100644
index 0000000..cc0202d
--- /dev/null
+++ b/debian/patches/ffmpeg_2.9.patch
@@ -0,0 +1,39 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
+Acked-By: Anton Gladky <gladk at debian.org>
+Last-Update: <2015-11-02>
+
+Index: ovito/src/3rdparty/video/VideoEncoder.cpp
+===================================================================
+--- ovito.orig/src/3rdparty/video/VideoEncoder.cpp
++++ ovito/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..375b21c 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ovito.git



More information about the debian-science-commits mailing list