Commit a377cfa6 authored by Aurelien Jacobs's avatar Aurelien Jacobs

add FF_API_AUDIO_OLD define to disable the deprecated decode_audio API

Originally committed as revision 25270 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent e2f0214a
......@@ -57,6 +57,9 @@
#ifndef FF_API_OPT_SHOW
#define FF_API_OPT_SHOW (LIBAVCODEC_VERSION_MAJOR < 53)
#endif
#ifndef FF_API_AUDIO_OLD
#define FF_API_AUDIO_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
#endif
#define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
#define AV_TIME_BASE 1000000
......@@ -2998,7 +3001,7 @@ struct AVResampleContext;
typedef struct ReSampleContext ReSampleContext;
#if LIBAVCODEC_VERSION_MAJOR < 53
#if FF_API_AUDIO_OLD
/**
* @deprecated Use av_audio_resample_init() instead.
*/
......@@ -3459,7 +3462,7 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2,
*/
int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
#if LIBAVCODEC_VERSION_MAJOR < 53
#if FF_API_AUDIO_OLD
/**
* Decode an audio frame from buf into samples.
* Wrapper function which calls avcodec_decode_audio3.
......
......@@ -217,7 +217,7 @@ ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
return s;
}
#if LIBAVCODEC_VERSION_MAJOR < 53
#if FF_API_AUDIO_OLD
ReSampleContext *audio_resample_init(int output_channels, int input_channels,
int output_rate, int input_rate)
{
......
......@@ -630,7 +630,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
return ret;
}
#if LIBAVCODEC_VERSION_MAJOR < 53
#if FF_API_AUDIO_OLD
int attribute_align_arg avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr,
const uint8_t *buf, int buf_size)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment