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:
authorAnton Khirnov <anton@khirnov.net>2014-01-26 16:22:26 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-01-28 12:25:40 +0400
commit2b858b45c26b52cdbf80528b6445248adc8eb7f1 (patch)
tree8b11ff180aa6b67a10bc283546cb38b19eb9818c /intern/ffmpeg
parentf99e581ae13c2c563f66cb0c31d3dfceeec21af7 (diff)
audaspace: use new libavcodec audio encoding API where available
Diffstat (limited to 'intern/ffmpeg')
-rw-r--r--intern/ffmpeg/ffmpeg_compat.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
index 91db329592d..58cf62ab623 100644
--- a/intern/ffmpeg/ffmpeg_compat.h
+++ b/intern/ffmpeg/ffmpeg_compat.h
@@ -90,6 +90,10 @@
#define FFMPEG_HAVE_DECODE_AUDIO4
#endif
+#if ((LIBAVCODEC_VERSION_MAJOR > 54) || (LIBAVCODEC_VERSION_MAJOR >= 54) && (LIBAVCODEC_VERSION_MINOR >= 13))
+#define FFMPEG_HAVE_AVFRAME_SAMPLE_RATE
+#endif
+
#if ((LIBAVUTIL_VERSION_MAJOR > 51) || (LIBAVUTIL_VERSION_MAJOR == 51) && (LIBAVUTIL_VERSION_MINOR >= 21))
#define FFMPEG_FFV1_ALPHA_SUPPORTED
#define FFMPEG_SAMPLE_FMT_S16P_SUPPORTED
@@ -267,6 +271,10 @@ void avcodec_free_frame(AVFrame **frame)
}
#endif
+#if ((LIBAVCODEC_VERSION_MAJOR > 54) || (LIBAVCODEC_VERSION_MAJOR >= 54) && (LIBAVCODEC_VERSION_MINOR >= 13))
+#define FFMPEG_HAVE_AVFRAME_SAMPLE_RATE
+#endif
+
#if ((LIBAVCODEC_VERSION_MAJOR > 54) || (LIBAVCODEC_VERSION_MAJOR == 54 && LIBAVCODEC_VERSION_MINOR >= 13))
#define FFMPEG_HAVE_FRAME_CHANNEL_LAYOUT
#endif
@@ -397,4 +405,18 @@ void avformat_close_input(AVFormatContext **ctx)
}
#endif
+#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(52, 8, 0)
+FFMPEG_INLINE
+AVFrame *av_frame_alloc(void)
+{
+ return avcodec_alloc_frame();
+}
+
+FFMPEG_INLINE
+void av_frame_free(AVFrame **frame)
+{
+ av_freep(frame);
+}
+#endif
+
#endif