Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-01-12 16:51:10 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-01-12 16:51:10 +0400
commitaab01c86cf56f5d21d2503f7e854bb19b07ca2c6 (patch)
treed64927b8781acf8a0b775bbf0def9e924ce8c88f /intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
parent497e6bfff9b6343e62d3711efa32c7389af7fec3 (diff)
Patch #33837: ffmpeg1.1 and libav9.1 compatibility update
Patch makes it possible to compile blender with recent ffmpeg and libav libraries, mainly by getting rid of deprecated API. Original patch by Campbell Barton with own modifications to support compilation with older ffmpeg versions. This patch could break compatibility of FFV1 videos playing back in older players, mainly because of alpha support changes. Preserving compatibility with such players became a headache and think it's high time to get rid of workarounds here.
Diffstat (limited to 'intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp')
-rw-r--r--intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
index 0a3d0f8e85a..831e1998182 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:
@@ -236,14 +236,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(boost::shared_ptr<AUD_Buffer> buffer) :
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)