diff options
author | Joerg Mueller <nexyon@gmail.com> | 2011-08-07 15:54:58 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2011-08-07 15:54:58 +0400 |
commit | 2d884fc035d403d43c7a18e3e61cd56ccdfbec2b (patch) | |
tree | 2548dcfbb52370618d1f255f57e65bcf1cbb49a4 /intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp | |
parent | 4370099fb0bc1bdd21f78b14a91a1d8eb76e1bc1 (diff) |
3D Audio GSoC:
* Pepper depends on ffmpeg 0.7.1 or higher now, windows and mac build systems set to ffmpeg-0.8
* Fixed orientation retrieval in OpenAL device code.
* Added stopAll() method to AUD_IDevice (also for Python) and call it on BGE exit
* Changed BGE to use audaspace via native C++ instead over the C API.
* Made AUD_SequencerFactory and AUD_SequencerEntry thread safe.
* Changed sound caching into a flag which fixes problems on file loading, especially with undo.
* Removed unused parameter from sound_mute_scene_sound
* Fixed bug: changing FPS didn't update the sequencer sound positions.
* Fixed bug: Properties of sequencer strips weren't set correctly.
* Minor warning fixes.
Diffstat (limited to 'intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp')
-rw-r--r-- | intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp index f2b7acc5ea2..197671ee37a 100644 --- a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp +++ b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp @@ -40,6 +40,7 @@ extern "C" { #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> #include <libavformat/avio.h> +#include "ffmpeg_compat.h" } static const char* context_error = "AUD_FFMPEGWriter: Couldn't allocate context."; @@ -127,7 +128,8 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filename, AUD_DeviceSpecs specs, m_codecCtx->bit_rate = bitrate; m_codecCtx->sample_rate = int(m_specs.rate); m_codecCtx->channels = m_specs.channels; - m_codecCtx->time_base = (AVRational){1, m_codecCtx->sample_rate}; + m_codecCtx->time_base.num = 1; + m_codecCtx->time_base.den = m_codecCtx->sample_rate; switch(m_specs.format) { @@ -180,7 +182,7 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filename, AUD_DeviceSpecs specs, try { - if(avio_open(&m_formatCtx->pb, filename.c_str(), AVIO_WRONLY)) + if(avio_open(&m_formatCtx->pb, filename.c_str(), AVIO_FLAG_WRITE)) AUD_THROW(AUD_ERROR_FILE, file_error); avformat_write_header(m_formatCtx, NULL); |