diff options
Diffstat (limited to 'intern/ffmpeg/ffmpeg_compat.h')
-rw-r--r-- | intern/ffmpeg/ffmpeg_compat.h | 22 |
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 |