On Do, Jan 19, 2012 at 09:51:20 (CET), John Vogel wrote: > I had the same problem with blender 2.61-1 segfaulting on my wheezy/sid > box. So I went about trying to build from git. Right away had problems > with missing headers declarations for libavutil/mathematics.h. Then, had > problems with avformat_alloc_open_context2() in > intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp. I found a fix in Gentoo's > ebuild for blender-2.60a which negates most of the current > debian/patches/0009-fix_FTBFS_ffmpeg_debian.patch. So I added the first > patch below and replaced the 0009 patch with the second patch below (the > one I found for the Gentoo ebuild). > > Builds fine and blender seems to running fine on my system, using up to > date sid and strictly pure debian system other then my wacom driver > (upstream kernel module and xorg driver). > > --- > intern/ffmpeg/ffmpeg_compat.h | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h > index dfdad22..bf6e4a9 100644 > --- a/intern/ffmpeg/ffmpeg_compat.h > +++ b/intern/ffmpeg/ffmpeg_compat.h > @@ -74,6 +74,10 @@ > #define FFMPEG_SWSCALE_COLOR_SPACE_SUPPORT > #endif > > +#if (LIBAVUTIL_VERSION_MAJOR > 51) || ((LIBAVUTIL_VERSION_MAJOR == 51) > && (LIBAVUTIL_VERSION_MINOR >= 9)) > +#include <libavutil/mathematics.h> > +#endif > +
No need to guard this #include directive. You don't do that below either. Just #include unconditionally > #ifndef FFMPEG_HAVE_AVIO > #define AVIO_FLAG_WRITE URL_WRONLY > #define avio_open url_fopen > -- > > > > > --- > intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp | 13 ++++++++++--- > 1 files changed, 10 insertions(+), 3 deletions(-) > > diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp > b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp > index 702c366..4fadbd1 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); That's tright, there is no avformat_alloc_output_context2() in libav, only in FFmpeg. > - 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) > { I guess that's fine, and would work just fine with FFmpeg as well, if that was some concern for Blender upstream. -- Gruesse/greetings, Reinhard Tartler, KeyID 945348A4 -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org