mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
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
This commit is contained in:
parent
e2f0214a0b
commit
a377cfa6c2
@ -57,6 +57,9 @@
|
|||||||
#ifndef FF_API_OPT_SHOW
|
#ifndef FF_API_OPT_SHOW
|
||||||
#define FF_API_OPT_SHOW (LIBAVCODEC_VERSION_MAJOR < 53)
|
#define FF_API_OPT_SHOW (LIBAVCODEC_VERSION_MAJOR < 53)
|
||||||
#endif
|
#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_NOPTS_VALUE INT64_C(0x8000000000000000)
|
||||||
#define AV_TIME_BASE 1000000
|
#define AV_TIME_BASE 1000000
|
||||||
@ -2998,7 +3001,7 @@ struct AVResampleContext;
|
|||||||
|
|
||||||
typedef struct ReSampleContext ReSampleContext;
|
typedef struct ReSampleContext ReSampleContext;
|
||||||
|
|
||||||
#if LIBAVCODEC_VERSION_MAJOR < 53
|
#if FF_API_AUDIO_OLD
|
||||||
/**
|
/**
|
||||||
* @deprecated Use av_audio_resample_init() instead.
|
* @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);
|
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.
|
* Decode an audio frame from buf into samples.
|
||||||
* Wrapper function which calls avcodec_decode_audio3.
|
* Wrapper function which calls avcodec_decode_audio3.
|
||||||
|
@ -217,7 +217,7 @@ ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LIBAVCODEC_VERSION_MAJOR < 53
|
#if FF_API_AUDIO_OLD
|
||||||
ReSampleContext *audio_resample_init(int output_channels, int input_channels,
|
ReSampleContext *audio_resample_init(int output_channels, int input_channels,
|
||||||
int output_rate, int input_rate)
|
int output_rate, int input_rate)
|
||||||
{
|
{
|
||||||
|
@ -630,7 +630,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
|
|||||||
return ret;
|
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 attribute_align_arg avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
|
||||||
int *frame_size_ptr,
|
int *frame_size_ptr,
|
||||||
const uint8_t *buf, int buf_size)
|
const uint8_t *buf, int buf_size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user