[SCM] blender/master: debian/patches/: re-work against v2.65a+svn53743
mfv-guest at users.alioth.debian.org
mfv-guest at users.alioth.debian.org
Sun Jan 13 16:30:40 UTC 2013
The following commit has been merged in the master branch:
commit 39fb20291a89626f89051eebb2bbb29cca967037
Author: Matteo F. Vescovi <mfv.debian at gmail.com>
Date: Sun Jan 13 10:02:09 2013 +0100
debian/patches/: re-work against v2.65a+svn53743
Given that I'm still learning to use gbp-pq,
I've given back ownership of patches to the
right creators, even if often I updated them.
Patch #0009-fix_FTBFS_against_libav9.patch
has been dropped since applied upstream.
Thanks to Campbell Burton (ideasman_42)
for helping us fixing this.
Thanks: Campbell Burton for helping on this.
Git-Dch: Short
diff --git a/debian/patches/0001-blender_thumbnailer.patch b/debian/patches/0001-blender_thumbnailer.patch
index da5e1d1..6181b71 100644
--- a/debian/patches/0001-blender_thumbnailer.patch
+++ b/debian/patches/0001-blender_thumbnailer.patch
@@ -1,4 +1,4 @@
-From: "Matteo F. Vescovi" <mfv.debian at gmail.com>
+From: Kevin Roy <kiniou at gmail.com>
Date: Mon, 30 Jul 2012 10:53:09 +0200
Subject: blender_thumbnailer
@@ -42,7 +42,7 @@ index 8b93eeb..44ffd48 100755
import struct
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index b66c000..5ea2892 100644
+index 72f1132..1979cbf 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -392,7 +392,7 @@ if(UNIX AND NOT APPLE)
diff --git a/debian/patches/0002-disable_tests.patch b/debian/patches/0002-disable_tests.patch
index 5646636..4240b1a 100644
--- a/debian/patches/0002-disable_tests.patch
+++ b/debian/patches/0002-disable_tests.patch
@@ -2,7 +2,7 @@ From: Kevin Roy <kiniou at gmail.com>
Date: Fri, 15 Apr 2011 19:44:00 +0200
Subject: disable_tests
-added WITH_TESTS condition to implicitly disable
+Added WITH_TESTS condition to implicitly disable.
---
source/CMakeLists.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/debian/patches/0003-install_in_usr_share.patch b/debian/patches/0003-install_in_usr_share.patch
index 9a13993..5f396d5 100644
--- a/debian/patches/0003-install_in_usr_share.patch
+++ b/debian/patches/0003-install_in_usr_share.patch
@@ -9,7 +9,7 @@ Subject: install_in_usr_share
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 5ea2892..2f45c21 100644
+index 1979cbf..c93fc9f 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -280,8 +280,8 @@ if(WITH_PYTHON)
diff --git a/debian/patches/0004-filter_docs_to_install.patch b/debian/patches/0004-filter_docs_to_install.patch
index 55dbc86..ec7dc68 100644
--- a/debian/patches/0004-filter_docs_to_install.patch
+++ b/debian/patches/0004-filter_docs_to_install.patch
@@ -1,14 +1,14 @@
-From: "Matteo F. Vescovi" <m.vescovi at revese.it>
+From: Kevin Roy <kiniou at gmail.com>
Date: Thu, 22 Dec 2011 18:13:03 +0100
Subject: filter_docs_to_install
-Install only relevant documentation
+Install only relevant documentation.
---
source/creator/CMakeLists.txt | 2 --
1 file changed, 2 deletions(-)
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 2f45c21..3d33654 100644
+index c93fc9f..a6c911e 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -225,8 +225,6 @@ else()
diff --git a/debian/patches/0005-locales_directory_install.patch b/debian/patches/0005-locales_directory_install.patch
index 640ba08..5f4251f 100644
--- a/debian/patches/0005-locales_directory_install.patch
+++ b/debian/patches/0005-locales_directory_install.patch
@@ -1,4 +1,4 @@
-From: "Matteo F. Vescovi" <mfv.debian at gmail.com>
+From: Kevin Roy <kiniou at gmail.com>
Date: Fri, 11 Jan 2013 15:29:45 +0100
Subject: locales_directory_install
@@ -11,10 +11,10 @@ Change where locales are installed.
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
-index 0ed4862..dc11b92 100644
+index 9086799..f7c6303 100644
--- a/source/blender/blenfont/intern/blf_lang.c
+++ b/source/blender/blenfont/intern/blf_lang.c
-@@ -184,7 +184,7 @@ EnumPropertyItem *BLF_RNA_lang_enum_properties(void)
+@@ -185,7 +185,7 @@ EnumPropertyItem *BLF_RNA_lang_enum_properties(void)
void BLF_lang_init(void)
{
@@ -24,7 +24,7 @@ index 0ed4862..dc11b92 100644
if (messagepath) {
bl_locale_init(messagepath, TEXT_DOMAIN_NAME);
diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h
-index 5e47adf..7b71863 100644
+index 8c51c92..ee70094 100644
--- a/source/blender/blenlib/BLI_path_util.h
+++ b/source/blender/blenlib/BLI_path_util.h
@@ -60,6 +60,7 @@ char *BLI_get_folder_version(const int id, const int ver, const int do_check);
@@ -36,7 +36,7 @@ index 5e47adf..7b71863 100644
/* for BLI_get_folder_version only */
#define BLENDER_RESOURCE_PATH_USER 0
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
-index 444daf8..039d750 100644
+index 06b1f1f..104dad3 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1092,6 +1092,9 @@ char *BLI_get_folder(int folder_id, const char *subfolder)
@@ -50,7 +50,7 @@ index 444daf8..039d750 100644
return path;
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 3d33654..31bc525 100644
+index a6c911e..462b7e1 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -292,9 +292,9 @@ endif()
diff --git a/debian/patches/0006-update_manpages.patch b/debian/patches/0006-update_manpages.patch
index ad3a580..8bbbdee 100644
--- a/debian/patches/0006-update_manpages.patch
+++ b/debian/patches/0006-update_manpages.patch
@@ -1,11 +1,9 @@
-From: "Matteo F. Vescovi" <mfv.debian at gmail.com>
+From: Kevin Roy <kiniou at gmail.com>
Date: Tue, 21 Feb 2012 21:34:30 +0100
Subject: update_manpages
- * Update blender manpage with current version
- * Add blenderplayer manpage
-
-Signed-off-by: Kevin Roy <kiniou at gmail.com>
+ * Update blender manpage with current version.
+ * Add blenderplayer manpage.
---
doc/manpage/blenderplayer.1 | 131 ++++++++++++++++++++++++++++++++++++++++++
source/creator/CMakeLists.txt | 5 +-
@@ -150,7 +148,7 @@ index 0000000..d15b0c9
+.SH AUTHORS
+This manpage was written for a Debian GNU/Linux by Kevin Roy <kiniou at gmail.com>.
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 31bc525..00f2dbe 100644
+index 462b7e1..1dfba9c 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -330,6 +330,7 @@ if(UNIX AND NOT APPLE)
diff --git a/debian/patches/0007-do_not_use_version_number_in_system_path.patch b/debian/patches/0007-do_not_use_version_number_in_system_path.patch
index 65496f2..8750bd5 100644
--- a/debian/patches/0007-do_not_use_version_number_in_system_path.patch
+++ b/debian/patches/0007-do_not_use_version_number_in_system_path.patch
@@ -10,7 +10,7 @@ without version numbers.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 00f2dbe..f69e066 100644
+index 1dfba9c..c2dec5a 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -240,7 +240,7 @@ if(UNIX AND NOT APPLE)
diff --git a/debian/patches/0008-look_for_droid_ttf_with_fontconfig.patch b/debian/patches/0008-look_for_droid_ttf_with_fontconfig.patch
index 3c6dcb3..4367989 100644
--- a/debian/patches/0008-look_for_droid_ttf_with_fontconfig.patch
+++ b/debian/patches/0008-look_for_droid_ttf_with_fontconfig.patch
@@ -1,26 +1,24 @@
-From: "Matteo F. Vescovi" <mfv.debian at gmail.com>
-Date: Sat, 12 Jan 2013 10:26:00 +0100
+From: Kevin Roy <kiniou at gmail.com>
+Date: Sun, 13 Jan 2013 09:59:18 +0100
Subject: look_for_droid_ttf_with_fontconfig
* Remove bad installation of fonts directory into locales.
* Avoid using the droid font shipped with upstream source
and use fontconfig to get it.
-
-Signed-off-by: Kevin Roy <kiniou at gmail.com>
---
CMakeLists.txt | 10 +++++
build_files/cmake/Modules/FindFontconfig.cmake | 49 ++++++++++++++++++++++++
- build_files/cmake/macros.cmake | 4 ++
+ build_files/cmake/macros.cmake | 3 ++
source/blender/blenfont/CMakeLists.txt | 7 ++++
source/blender/blenfont/intern/blf_translation.c | 23 +++++++++++
source/blender/blenlib/BLI_fileops.h | 1 +
source/blender/blenlib/intern/fileops.c | 43 +++++++++++++++++++++
source/creator/CMakeLists.txt | 1 -
- 8 files changed, 137 insertions(+), 1 deletion(-)
+ 8 files changed, 136 insertions(+), 1 deletion(-)
create mode 100644 build_files/cmake/Modules/FindFontconfig.cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 3e1c8fe..82c4f98 100644
+index ecc3f3e..54a4f1e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -116,6 +116,9 @@ option(WITH_BLENDER "Build blender (disable to build only the blender player)" O
@@ -33,7 +31,7 @@ index 3e1c8fe..82c4f98 100644
option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON)
option(WITH_PYTHON_SECURITY "Disables execution of scripts within blend files by default (recommend to leave off)" OFF)
-@@ -578,6 +581,13 @@ if(UNIX AND NOT APPLE)
+@@ -589,6 +592,13 @@ if(UNIX AND NOT APPLE)
endif()
endif()
@@ -103,19 +101,18 @@ index 0000000..337ece9
+
+endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
-index efa258a..2570607 100644
+index bdd82a4..7fdd862 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
-@@ -283,6 +283,10 @@ macro(setup_liblinks
+@@ -282,6 +282,9 @@ macro(setup_liblinks
+ if(WITH_SYSTEM_GLEW)
target_link_libraries(${target} ${GLEW_LIBRARY})
endif()
-
+ if(WITH_FONTCONFIG)
+ target_link_libraries(${target} ${FONTCONFIG_LIBRARIES})
+ endif()
-+
- if(WITH_OPENAL)
- target_link_libraries(${target} ${OPENAL_LIBRARY})
+ if(WITH_BULLET AND WITH_SYSTEM_BULLET)
+ target_link_libraries(${target} ${BULLET_LIBRARIES})
endif()
diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt
index 90baef1..fa03af7 100644
@@ -196,7 +193,7 @@ index c278370..c9789f1 100644
size_t BLI_file_descriptor_size(int file);
size_t BLI_file_size(const char *file);
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
-index 883cdfd..5528377 100644
+index 0f42fca..96e85c4 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -155,6 +155,49 @@ char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r)
@@ -250,7 +247,7 @@ index 883cdfd..5528377 100644
/* return 1 when file can be written */
int BLI_file_is_writable(const char *filename)
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index f69e066..f4eb146 100644
+index c2dec5a..60096a8 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -293,7 +293,6 @@ if(WITH_INTERNATIONAL)
diff --git a/debian/patches/0009-fix_FTBFS_against_libav9.patch b/debian/patches/0009-fix_FTBFS_against_libav9.patch
deleted file mode 100644
index 7d93d5c..0000000
--- a/debian/patches/0009-fix_FTBFS_against_libav9.patch
+++ /dev/null
@@ -1,466 +0,0 @@
-From: Diego Elio Petteno' <flameeyes at flameeyes.eu>
-Date: Fri, 11 Jan 2013 16:13:46 +0100
-Subject: fix_FTBFS_against_libav9
-
----
- intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp | 12 ++---
- intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp | 17 ++++--
- intern/ffmpeg/ffmpeg_compat.h | 1 +
- source/blender/blenkernel/intern/writeffmpeg.c | 71 +++++++++-----------------
- source/blender/imbuf/intern/anim_movie.c | 9 ++--
- source/blender/imbuf/intern/indexer.c | 12 ++---
- source/blender/imbuf/intern/util.c | 6 +--
- source/gameengine/VideoTexture/VideoFFmpeg.cpp | 4 +-
- 8 files changed, 56 insertions(+), 76 deletions(-)
-
-diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
-index 0a3d0f8..af614b0 100644
---- a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
-+++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
-@@ -107,7 +107,7 @@ void AUD_FFMPEGReader::init()
- m_position = 0;
- m_pkgbuf_left = 0;
-
-- if(av_find_stream_info(m_formatCtx)<0)
-+ if(avformat_find_stream_info(m_formatCtx, NULL)<0)
- AUD_THROW(AUD_ERROR_FFMPEG, streaminfo_error);
-
- // find audio stream and codec
-@@ -133,7 +133,7 @@ void AUD_FFMPEGReader::init()
- if(!aCodec)
- AUD_THROW(AUD_ERROR_FFMPEG, nodecoder_error);
-
-- if(avcodec_open(m_codecCtx, aCodec)<0)
-+ if(avcodec_open2(m_codecCtx, aCodec, NULL)<0)
- AUD_THROW(AUD_ERROR_FFMPEG, codecopen_error);
-
- // XXX this prints file information to stdout:
-@@ -237,13 +237,7 @@ AUD_FFMPEGReader::~AUD_FFMPEGReader()
- {
- avcodec_close(m_codecCtx);
-
-- if(m_aviocontext)
-- {
-- avformat_close_input(&m_formatCtx);
-- av_free(m_aviocontext);
-- }
-- else
-- av_close_input_file(m_formatCtx);
-+ avformat_close_input(&m_formatCtx);
- }
-
- int AUD_FFMPEGReader::read_packet(void* opaque, uint8_t* buf, int buf_size)
-diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp
-index 2b34348..2578249 100644
---- a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp
-+++ b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp
-@@ -38,6 +38,8 @@ extern "C" {
- #include <libavcodec/avcodec.h>
- #include <libavformat/avformat.h>
- #include <libavformat/avio.h>
-+#include <libavutil/mathematics.h>
-+#include <libavutil/avstring.h>
- #include "ffmpeg_compat.h"
- }
-
-@@ -55,10 +57,15 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filename, AUD_DeviceSpecs specs,
- {
- static const char* formats[] = { NULL, "ac3", "flac", "matroska", "mp2", "mp3", "ogg", "wav" };
-
-- if(avformat_alloc_output_context2(&m_formatCtx, NULL, formats[format], filename.c_str()))
-- AUD_THROW(AUD_ERROR_FFMPEG, context_error);
-+ m_formatCtx = avformat_alloc_context();
-+ if (!m_formatCtx) AUD_THROW(AUD_ERROR_FFMPEG, context_error);
-
-- m_outputFmt = m_formatCtx->oformat;
-+ av_strlcpy(m_formatCtx->filename, filename.c_str(), sizeof(m_formatCtx->filename));
-+ m_outputFmt = m_formatCtx->oformat = av_guess_format(formats[format], filename.c_str(), NULL);
-+ if (!m_outputFmt) {
-+ avformat_free_context(m_formatCtx);
-+ AUD_THROW(AUD_ERROR_FFMPEG, context_error);
-+ }
-
- switch(codec)
- {
-@@ -116,7 +123,7 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filename, AUD_DeviceSpecs specs,
- if(m_outputFmt->audio_codec == CODEC_ID_NONE)
- AUD_THROW(AUD_ERROR_SPECS, codec_error);
-
-- m_stream = av_new_stream(m_formatCtx, 0);
-+ m_stream = avformat_new_stream(m_formatCtx, NULL);
- if(!m_stream)
- AUD_THROW(AUD_ERROR_FFMPEG, stream_error);
-
-@@ -164,7 +171,7 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filename, AUD_DeviceSpecs specs,
- if(!codec)
- AUD_THROW(AUD_ERROR_FFMPEG, codec_error);
-
-- if(avcodec_open(m_codecCtx, codec))
-+ if(avcodec_open2(m_codecCtx, codec, NULL))
- AUD_THROW(AUD_ERROR_FFMPEG, codec_error);
-
- m_output_buffer.resize(FF_MIN_BUFFER_SIZE);
-diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
-index 37cde2c..ccf03a8 100644
---- a/intern/ffmpeg/ffmpeg_compat.h
-+++ b/intern/ffmpeg/ffmpeg_compat.h
-@@ -32,6 +32,7 @@
-
- #include <libavcodec/avcodec.h>
- #include <libavutil/rational.h>
-+#include <libavutil/mathematics.h>
- #include <libavutil/opt.h>
-
- #if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 101))
-diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
-index 0f861a7..af0eaef 100644
---- a/source/blender/blenkernel/intern/writeffmpeg.c
-+++ b/source/blender/blenkernel/intern/writeffmpeg.c
-@@ -43,6 +43,7 @@
- #include <libavcodec/avcodec.h>
- #include <libavutil/rational.h>
- #include <libavutil/samplefmt.h>
-+#include <libavutil/opt.h>
- #include <libswscale/swscale.h>
-
- #include "MEM_guardedalloc.h"
-@@ -373,7 +374,7 @@ static void set_ffmpeg_property_option(AVCodecContext *c, IDProperty *prop)
- {
- char name[128];
- char *param;
-- const AVOption *rv = NULL;
-+ int rv;
-
- PRINT("FFMPEG expert option: %s: ", prop->name);
-
-@@ -388,30 +389,30 @@ static void set_ffmpeg_property_option(AVCodecContext *c, IDProperty *prop)
- switch (prop->type) {
- case IDP_STRING:
- PRINT("%s.\n", IDP_String(prop));
-- av_set_string3(c, prop->name, IDP_String(prop), 1, &rv);
-+ rv = av_opt_set(c, prop->name, IDP_String(prop), 0);
- break;
- case IDP_FLOAT:
- PRINT("%g.\n", IDP_Float(prop));
-- rv = av_set_double(c, prop->name, IDP_Float(prop));
-+ rv = av_opt_set_double(c, prop->name, IDP_Float(prop), 0);
- break;
- case IDP_INT:
- PRINT("%d.\n", IDP_Int(prop));
-
- if (param) {
- if (IDP_Int(prop)) {
-- av_set_string3(c, name, param, 1, &rv);
-+ rv = av_opt_set(c, name, param, 0);
- }
- else {
- return;
- }
- }
- else {
-- rv = av_set_int(c, prop->name, IDP_Int(prop));
-+ rv = av_opt_set_int(c, prop->name, IDP_Int(prop), 0);
- }
- break;
- }
-
-- if (!rv) {
-+ if (rv) {
- PRINT("ffmpeg-option not supported: %s! Skipping.\n", prop->name);
- }
- }
-@@ -464,7 +465,7 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
-
- error[0] = '\0';
-
-- st = av_new_stream(of, 0);
-+ st = avformat_new_stream(of, NULL);
- if (!st) return NULL;
-
- /* Set up the codec context */
-@@ -528,24 +529,11 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
- }
-
- /* Keep lossless encodes in the RGB domain. */
-- if (codec_id == CODEC_ID_HUFFYUV) {
-+ if (codec_id == CODEC_ID_HUFFYUV || codec_id == CODEC_ID_FFV1) {
- /* HUFFYUV was PIX_FMT_YUV422P before */
- c->pix_fmt = PIX_FMT_RGB32;
- }
-
-- if (codec_id == CODEC_ID_FFV1) {
--#ifdef FFMPEG_FFV1_ALPHA_SUPPORTED
-- if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
-- c->pix_fmt = PIX_FMT_RGB32;
-- }
-- else {
-- c->pix_fmt = PIX_FMT_BGR0;
-- }
--#else
-- c->pix_fmt = PIX_FMT_RGB32;
--#endif
-- }
--
- if (codec_id == CODEC_ID_QTRLE) {
- if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
- c->pix_fmt = PIX_FMT_ARGB;
-@@ -575,7 +563,7 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
-
- set_ffmpeg_properties(rd, c, "video");
-
-- if (avcodec_open(c, codec) < 0) {
-+ if (avcodec_open2(c, codec, NULL) < 0) {
- BLI_strncpy(error, IMB_ffmpeg_last_error(), error_size);
- return NULL;
- }
-@@ -612,7 +600,7 @@ static AVStream *alloc_audio_stream(RenderData *rd, int codec_id, AVFormatContex
-
- error[0] = '\0';
-
-- st = av_new_stream(of, 1);
-+ st = avformat_new_stream(of, NULL);
- if (!st) return NULL;
-
- c = st->codec;
-@@ -635,7 +623,7 @@ static AVStream *alloc_audio_stream(RenderData *rd, int codec_id, AVFormatContex
-
- set_ffmpeg_properties(rd, c, "audio");
-
-- if (avcodec_open(c, codec) < 0) {
-+ if (avcodec_open2(c, codec, NULL) < 0) {
- //XXX error("Couldn't initialize audio codec");
- BLI_strncpy(error, IMB_ffmpeg_last_error(), error_size);
- return NULL;
-@@ -671,15 +659,6 @@ static AVStream *alloc_audio_stream(RenderData *rd, int codec_id, AVFormatContex
- }
- /* essential functions -- start, append, end */
-
--static void ffmpeg_dict_set_int(AVDictionary **dict, const char *key, int value)
--{
-- char buffer[32];
--
-- BLI_snprintf(buffer, sizeof(buffer), "%d", value);
--
-- av_dict_set(dict, key, buffer, 0);
--}
--
- static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, ReportList *reports)
- {
- /* Handle to the output file */
-@@ -728,13 +707,13 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
- of->oformat = fmt;
- of->packet_size = rd->ffcodecdata.mux_packet_size;
- if (ffmpeg_audio_codec != CODEC_ID_NONE) {
-- ffmpeg_dict_set_int(&opts, "muxrate", rd->ffcodecdata.mux_rate);
-+ av_opt_set_int(of, "muxrate", rd->ffcodecdata.mux_rate, 0);
- }
- else {
-- av_dict_set(&opts, "muxrate", "0", 0);
-+ av_opt_set_int(of, "muxrate", 0, 0);
- }
-
-- ffmpeg_dict_set_int(&opts, "preload", (int)(0.5 * AV_TIME_BASE));
-+ av_opt_set_int(of, "preload", (int)(0.5*AV_TIME_BASE), 0);
-
- of->max_delay = (int)(0.7 * AV_TIME_BASE);
-
-@@ -1144,7 +1123,7 @@ IDProperty *BKE_ffmpeg_property_add(RenderData *rd, const char *type, int opt_in
-
- val.i = 0;
-
-- avcodec_get_context_defaults(&c);
-+ avcodec_get_context_defaults3(&c, NULL);
-
- o = c.av_class->option + opt_index;
- parent = c.av_class->option + parent_index;
-@@ -1175,23 +1154,23 @@ IDProperty *BKE_ffmpeg_property_add(RenderData *rd, const char *type, int opt_in
- }
-
- switch (o->type) {
-- case FF_OPT_TYPE_INT:
-- case FF_OPT_TYPE_INT64:
-+ case AV_OPT_TYPE_INT:
-+ case AV_OPT_TYPE_INT64:
- val.i = FFMPEG_DEF_OPT_VAL_INT(o);
- idp_type = IDP_INT;
- break;
-- case FF_OPT_TYPE_DOUBLE:
-- case FF_OPT_TYPE_FLOAT:
-+ case AV_OPT_TYPE_DOUBLE:
-+ case AV_OPT_TYPE_FLOAT:
- val.f = FFMPEG_DEF_OPT_VAL_DOUBLE(o);
- idp_type = IDP_FLOAT;
- break;
-- case FF_OPT_TYPE_STRING:
-+ case AV_OPT_TYPE_STRING:
- val.string.str = (char *)" ";
- val.string.len = 80;
- /* val.str = (char *)" ";*/
- idp_type = IDP_STRING;
- break;
-- case FF_OPT_TYPE_CONST:
-+ case AV_OPT_TYPE_CONST:
- val.i = 1;
- idp_type = IDP_INT;
- break;
-@@ -1231,7 +1210,7 @@ int BKE_ffmpeg_property_add_string(RenderData *rd, const char *type, const char
- char *param;
- IDProperty *prop = NULL;
-
-- avcodec_get_context_defaults(&c);
-+ avcodec_get_context_defaults3(&c, NULL);
-
- strncpy(name_, str, sizeof(name_));
-
-@@ -1252,10 +1231,10 @@ int BKE_ffmpeg_property_add_string(RenderData *rd, const char *type, const char
- if (!o) {
- return 0;
- }
-- if (param && o->type == FF_OPT_TYPE_CONST) {
-+ if (param && o->type == AV_OPT_TYPE_CONST) {
- return 0;
- }
-- if (param && o->type != FF_OPT_TYPE_CONST && o->unit) {
-+ if (param && o->type != AV_OPT_TYPE_CONST && o->unit) {
- p = my_av_find_opt(&c, param, o->unit, 0, 0);
- if (p) {
- prop = BKE_ffmpeg_property_add(rd, (char *) type, p - c.av_class->option, o - c.av_class->option);
-diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
-index 8dfdbd4..cec41e1 100644
---- a/source/blender/imbuf/intern/anim_movie.c
-+++ b/source/blender/imbuf/intern/anim_movie.c
-@@ -486,8 +486,8 @@ static int startffmpeg(struct anim *anim)
- return -1;
- }
-
-- if (av_find_stream_info(pFormatCtx) < 0) {
-- av_close_input_file(pFormatCtx);
-+ if (avformat_find_stream_info(pFormatCtx, NULL)<0) {
-+ avformat_close_input(&pFormatCtx);
- return -1;
- }
-
-@@ -508,7 +508,7 @@ static int startffmpeg(struct anim *anim)
- }
-
- if (videoStream == -1) {
-- av_close_input_file(pFormatCtx);
-+ avformat_close_input(&pFormatCtx);
- return -1;
- }
-
-@@ -523,7 +523,7 @@ static int startffmpeg(struct anim *anim)
-
- pCodecCtx->workaround_bugs = 1;
-
-- if (avcodec_open(pCodecCtx, pCodec) < 0) {
-+ if (avcodec_open2(pCodecCtx, pCodec, NULL) < 0) {
- av_close_input_file(pFormatCtx);
- return -1;
- }
-@@ -1050,7 +1050,6 @@ static ImBuf *ffmpeg_fetchibuf(struct anim *anim, int position,
- ret = av_seek_frame(anim->pFormatCtx,
- -1,
- pos, AVSEEK_FLAG_BYTE);
-- av_update_cur_dts(anim->pFormatCtx, v_st, dts);
- }
- else {
- av_log(anim->pFormatCtx, AV_LOG_DEBUG,
-diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
-index 277f50b..f260993 100644
---- a/source/blender/imbuf/intern/indexer.c
-+++ b/source/blender/imbuf/intern/indexer.c
-@@ -496,7 +496,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
-
- fprintf(stderr, "Starting work on proxy: %s\n", rv->of->filename);
-
-- rv->st = av_new_stream(rv->of, 0);
-+ rv->st = avformat_new_stream(rv->of, NULL);
- rv->c = rv->st->codec;
- rv->c->codec_type = AVMEDIA_TYPE_VIDEO;
- rv->c->codec_id = CODEC_ID_MJPEG;
-@@ -531,8 +531,8 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
- /* there's no way to set JPEG quality in the same way as in AVI JPEG and image sequence,
- * but this seems to be giving expected quality result */
- ffmpeg_quality = (int)(1.0f + 30.0f * (1.0f - (float)quality / 100.0f) + 0.5f);
-- av_set_int(rv->c, "qmin", ffmpeg_quality);
-- av_set_int(rv->c, "qmax", ffmpeg_quality);
-+ av_opt_set_int(rv->c, "qmin", ffmpeg_quality, 0);
-+ av_opt_set_int(rv->c, "qmax", ffmpeg_quality, 0);
-
- if (rv->of->flags & AVFMT_GLOBALHEADER) {
- rv->c->flags |= CODEC_FLAG_GLOBAL_HEADER;
-@@ -545,7 +545,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
- return 0;
- }
-
-- avcodec_open(rv->c, rv->codec);
-+ avcodec_open2(rv->c, rv->codec, NULL);
-
- rv->video_buffersize = 2000000;
- rv->video_buffer = (uint8_t *)MEM_mallocN(
-@@ -758,7 +758,7 @@ static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim, IMB_Tim
- return NULL;
- }
-
-- if (av_find_stream_info(context->iFormatCtx) < 0) {
-+ if (avformat_find_stream_info(context->iFormatCtx, NULL) < 0) {
- av_close_input_file(context->iFormatCtx);
- MEM_freeN(context);
- return NULL;
-@@ -797,7 +797,7 @@ static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim, IMB_Tim
-
- context->iCodecCtx->workaround_bugs = 1;
-
-- if (avcodec_open(context->iCodecCtx, context->iCodec) < 0) {
-+ if (avcodec_open2(context->iCodecCtx, context->iCodec, NULL) < 0) {
- av_close_input_file(context->iFormatCtx);
- MEM_freeN(context);
- return NULL;
-diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
-index 42fb0c7..3340c78 100644
---- a/source/blender/imbuf/intern/util.c
-+++ b/source/blender/imbuf/intern/util.c
-@@ -306,9 +306,9 @@ static int isffmpeg(const char *filename)
- return 0;
- }
-
-- if (av_find_stream_info(pFormatCtx) < 0) {
-+ if (avformat_find_stream_info(pFormatCtx, NULL)<0) {
- if (UTIL_DEBUG) fprintf(stderr, "isffmpeg: av_find_stream_info failed\n");
-- av_close_input_file(pFormatCtx);
-+ avformat_close_input(&pFormatCtx);
- return 0;
- }
-
-@@ -340,7 +340,7 @@ static int isffmpeg(const char *filename)
- return 0;
- }
-
-- if (avcodec_open(pCodecCtx, pCodec) < 0) {
-+ if (avcodec_open2(pCodecCtx, pCodec, NULL)<0) {
- av_close_input_file(pFormatCtx);
- return 0;
- }
-diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
-index 8976a21..6d0913b 100644
---- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp
-+++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
-@@ -174,7 +174,7 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV
- if (avformat_open_input(&formatCtx, filename, inputFormat, formatParams)!=0)
- return -1;
-
-- if (av_find_stream_info(formatCtx)<0)
-+ if (avformat_find_stream_info(formatCtx, formatParams)<0)
- {
- av_close_input_file(formatCtx);
- return -1;
-@@ -209,7 +209,7 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV
- return -1;
- }
- codecCtx->workaround_bugs = 1;
-- if (avcodec_open(codecCtx, codec)<0)
-+ if (avcodec_open2(codecCtx, codec, NULL)<0)
- {
- av_close_input_file(formatCtx);
- return -1;
diff --git a/debian/patches/series b/debian/patches/series
index f594905..fdfc048 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,4 +6,3 @@
0006-update_manpages.patch
0007-do_not_use_version_number_in_system_path.patch
0008-look_for_droid_ttf_with_fontconfig.patch
-0009-fix_FTBFS_against_libav9.patch
--
blender packaging
More information about the pkg-multimedia-commits
mailing list