diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-01-16 18:40:37 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-01-28 12:00:31 +0400 |
commit | 8c3b27ce279f1f0904af3c220d92acfa1f20a70e (patch) | |
tree | 077e32b67a7bbc644e979102eb455aeb0ed75cdd /intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp | |
parent | 6fe5b3be38af229640d1926bd908361d5e7a2b15 (diff) |
Change libavcodec CODEC_ID_* to AV_CODEC_ID_*
CODEC_ID_* have been replaced with AV_CODEC_ID_* in new libavcodec
versions.
Update the code to use those new identifiers.
Added a compatibility code to ffmpeg_compat.h
Diffstat (limited to 'intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp')
-rw-r--r-- | intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp index 55040e4db8e..d35b6d56c69 100644 --- a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp +++ b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp @@ -68,57 +68,57 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filename, AUD_DeviceSpecs specs, switch(codec) { case AUD_CODEC_AAC: - m_outputFmt->audio_codec = CODEC_ID_AAC; + m_outputFmt->audio_codec = AV_CODEC_ID_AAC; break; case AUD_CODEC_AC3: - m_outputFmt->audio_codec = CODEC_ID_AC3; + m_outputFmt->audio_codec = AV_CODEC_ID_AC3; break; case AUD_CODEC_FLAC: - m_outputFmt->audio_codec = CODEC_ID_FLAC; + m_outputFmt->audio_codec = AV_CODEC_ID_FLAC; break; case AUD_CODEC_MP2: - m_outputFmt->audio_codec = CODEC_ID_MP2; + m_outputFmt->audio_codec = AV_CODEC_ID_MP2; break; case AUD_CODEC_MP3: - m_outputFmt->audio_codec = CODEC_ID_MP3; + m_outputFmt->audio_codec = AV_CODEC_ID_MP3; break; case AUD_CODEC_PCM: switch(specs.format) { case AUD_FORMAT_U8: - m_outputFmt->audio_codec = CODEC_ID_PCM_U8; + m_outputFmt->audio_codec = AV_CODEC_ID_PCM_U8; break; case AUD_FORMAT_S16: - m_outputFmt->audio_codec = CODEC_ID_PCM_S16LE; + m_outputFmt->audio_codec = AV_CODEC_ID_PCM_S16LE; break; case AUD_FORMAT_S24: - m_outputFmt->audio_codec = CODEC_ID_PCM_S24LE; + m_outputFmt->audio_codec = AV_CODEC_ID_PCM_S24LE; break; case AUD_FORMAT_S32: - m_outputFmt->audio_codec = CODEC_ID_PCM_S32LE; + m_outputFmt->audio_codec = AV_CODEC_ID_PCM_S32LE; break; case AUD_FORMAT_FLOAT32: - m_outputFmt->audio_codec = CODEC_ID_PCM_F32LE; + m_outputFmt->audio_codec = AV_CODEC_ID_PCM_F32LE; break; case AUD_FORMAT_FLOAT64: - m_outputFmt->audio_codec = CODEC_ID_PCM_F64LE; + m_outputFmt->audio_codec = AV_CODEC_ID_PCM_F64LE; break; default: - m_outputFmt->audio_codec = CODEC_ID_NONE; + m_outputFmt->audio_codec = AV_CODEC_ID_NONE; break; } break; case AUD_CODEC_VORBIS: - m_outputFmt->audio_codec = CODEC_ID_VORBIS; + m_outputFmt->audio_codec = AV_CODEC_ID_VORBIS; break; default: - m_outputFmt->audio_codec = CODEC_ID_NONE; + m_outputFmt->audio_codec = AV_CODEC_ID_NONE; break; } try { - if(m_outputFmt->audio_codec == CODEC_ID_NONE) + if(m_outputFmt->audio_codec == AV_CODEC_ID_NONE) AUD_THROW(AUD_ERROR_SPECS, codec_error); m_stream = avformat_new_stream(m_formatCtx, NULL); |