[FFmpeg-devel] [PATCH 1/2] avcodec: move the old decoding/encoding API under and ifdef
Rostislav Pehlivanov
atomnuker at gmail.com
Sun Dec 31 15:07:27 EET 2017
Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>
---
libavcodec/avcodec.h | 4 +++-
libavcodec/version.h | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index c13deb599f..5a27211b80 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4558,6 +4558,7 @@ int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
*/
enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos);
+#if FF_API_OLD_CODING
/**
* Decode the audio frame of size avpkt->size from avpkt->data into frame.
*
@@ -4609,7 +4610,7 @@ enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos);
* decoding, otherwise the number of bytes consumed from the input
* AVPacket is returned.
*
-* @deprecated Use avcodec_send_packet() and avcodec_receive_frame().
+ * @deprecated Use avcodec_send_packet() and avcodec_receive_frame().
*/
attribute_deprecated
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
@@ -4664,6 +4665,7 @@ attribute_deprecated
int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr,
const AVPacket *avpkt);
+#endif
/**
* Decode a subtitle message.
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 47a15d52b8..2886e76860 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -127,7 +127,10 @@
#define FF_API_USER_VISIBLE_AVHWACCEL (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_LOCKMGR
-#define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59)
+#define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59)
+#endif
+#ifndef FF_API_OLD_CODING
+#define FF_API_OLD_CODING (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
--
2.15.1.620.gb9897f4670
More information about the ffmpeg-devel
mailing list