[SCM] 01/01: Transition to libav9
Christophe Trophime
trophime-guest at moszumanska.debian.org
Mon Jan 20 10:10:30 UTC 2014
This is an automated email from the git hooks/post-receive script.
trophime-guest pushed a commit to branch master
in repository elmerfem.
commit 007f36b654875b2587447d12b5a196abe81fef17
Author: Christophe Trophime <christrophime at googlemail.com>
Date: Mon Jan 20 11:10:01 2014 +0100
Transition to libav9
---
debian/patches/libav9.patch | 61 +++++++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 62 insertions(+)
diff --git a/debian/patches/libav9.patch b/debian/patches/libav9.patch
new file mode 100644
index 0000000..4ebe4e1
--- /dev/null
+++ b/debian/patches/libav9.patch
@@ -0,0 +1,61 @@
+Index: elmerfem/utils/ElmerClips/src/encoder.cpp
+===================================================================
+--- elmerfem.orig/utils/ElmerClips/src/encoder.cpp 2014-01-20 10:21:20.395006371 +0100
++++ elmerfem/utils/ElmerClips/src/encoder.cpp 2014-01-20 10:21:28.555381042 +0100
+@@ -188,7 +188,7 @@
+
+ // Initialize avcodec:
+ //---------------------
+- avcodec_init();
++ //avcodec_init();
+
+ avcodec_register_all();
+
+@@ -205,7 +205,7 @@
+
+ // Init context:
+ //---------------
+- AVCodecContext *context = avcodec_alloc_context();
++ AVCodecContext *context = avcodec_alloc_context3(codec);
+
+ if(!context) {
+ emit information("ERROR: Unable to initialize encoder");
+@@ -224,7 +224,7 @@
+ context->max_b_frames = 2;
+ context->pix_fmt = PIX_FMT_YUV420P;
+
+- if(avcodec_open(context, codec) < 0) {
++ if(avcodec_open2(context, codec, NULL) < 0) {
+ emit information("ERROR: Unable to initialize encoder");
+ avcodec_close(context);
+ return;
+@@ -268,7 +268,7 @@
+ continue;
+ }
+
+- bytes = avcodec_encode_video(context, (uint8_t *)bufferMPG.data(),
++ bytes = avcodec_encode_video(context, (uint8_t *)bufferMPG.data(),
+ bufferMPG.size(), frameYUV);
+
+ if(file.write(bufferMPG, bytes) != bytes) {
+@@ -282,7 +282,7 @@
+ // Get the delayed frames:
+ //-------------------------
+ for( ; bytes; ) {
+- bytes = avcodec_encode_video(context, (uint8_t *)bufferMPG.data(),
++ bytes = avcodec_encode_video(context, (uint8_t *)bufferMPG.data(),
+ bufferMPG.size(), NULL);
+
+ if(file.write(bufferMPG, bytes) != bytes) {
+Index: elmerfem/utils/ElmerClips/src/encoder.h
+===================================================================
+--- elmerfem.orig/utils/ElmerClips/src/encoder.h 2013-02-15 12:31:58.000000000 +0100
++++ elmerfem/utils/ElmerClips/src/encoder.h 2014-01-20 10:27:43.556597643 +0100
+@@ -48,6 +48,7 @@
+ #endif
+
+ extern "C" {
++#include <libavutil/mem.h>
+ #include <libavcodec/avcodec.h>
+ #include <libswscale/swscale.h>
+ }
diff --git a/debian/patches/series b/debian/patches/series
index fa8f6ec..88a6025 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,4 @@ fix-build-with-hardening-compiler-options.patch
fix-spelling-errors.patch
add-linking-flags-for-elmerparam-library.patch
add-NAMESPACE-for-elmerparam-R-module.patch
+libav9.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/elmerfem.git
More information about the debian-science-commits
mailing list