[SCM] libav/experimental: add FF_API_AUDIO_OLD define to disable the deprecated decode_audio API
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:16:39 UTC 2013
The following commit has been merged in the experimental branch:
commit a377cfa6c2d68f6feec4cb2aa9b87d7ec07340e7
Author: Aurelien Jacobs <aurel at gnuage.org>
Date: Thu Sep 30 15:37:01 2010 +0000
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
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 3667e72..e701a82 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -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.
diff --git a/libavcodec/resample.c b/libavcodec/resample.c
index e51b4fc..222b28c 100644
--- a/libavcodec/resample.c
+++ b/libavcodec/resample.c
@@ -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)
{
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 7edff41..69439b8 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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)
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list