diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-18 14:29:11 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-18 14:29:11 +0400 |
commit | 0d64e050ea10ef9887323613c2fc6b429ebd53c9 (patch) | |
tree | 8954ec1670200f2f15e8379c9498e9f8a529802e /intern/ffmpeg/ffmpeg_compat.h | |
parent | 5e6e9bd616840cb1c9d4f41d333540f5294548e9 (diff) |
Reduce amount of deprecated symbols used from FFmpeg
This switches some areas of Blender which are related on FFmpeg stuff
from deprecated symbols to currently supported one.
Pretty straightforward changes based on documentation of FFmpeg's
API which symbols should be now used.
This should make Blender compatible with recent FFmpeg 0.11.
Should be no functional changes.
Diffstat (limited to 'intern/ffmpeg/ffmpeg_compat.h')
-rw-r--r-- | intern/ffmpeg/ffmpeg_compat.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h index 9dbbb46ce40..703c528bdea 100644 --- a/intern/ffmpeg/ffmpeg_compat.h +++ b/intern/ffmpeg/ffmpeg_compat.h @@ -40,7 +40,6 @@ #endif #include <libswscale/swscale.h> -#include <libavcodec/opt.h> #if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 105)) #define FFMPEG_HAVE_AVIO 1 @@ -76,6 +75,20 @@ #define FFMPEG_FFV1_ALPHA_SUPPORTED #endif +#if ((LIBAVFORMAT_VERSION_MAJOR < 53) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR < 24)) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR < 24) && (LIBAVFORMAT_VERSION_MICRO < 2))) +#define avformat_close_input(x) av_close_input_file(*(x)) +#endif + +#if ((LIBAVFORMAT_VERSION_MAJOR > 53) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR > 32)) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR == 24) && (LIBAVFORMAT_VERSION_MICRO >= 100))) +void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp); + +static inline +void av_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp) +{ + ff_update_cur_dts(s, ref_st, timestamp); +} +#endif + #ifndef FFMPEG_HAVE_AVIO #define AVIO_FLAG_WRITE URL_WRONLY #define avio_open url_fopen |