[FFmpeg-devel] [PATCH 4/6] avcodec: delay removal of avcodec_*_frame
Andreas Cadhalpun
andreas.cadhalpun at googlemail.com
Sat Aug 8 13:37:08 CEST 2015
They are still widely used and have been deprecated for less than two years.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
---
libavcodec/avcodec.h | 2 +-
libavcodec/utils.c | 2 +-
libavcodec/version.h | 3 +++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 4222db6..4202e71 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3919,7 +3919,7 @@ const AVClass *avcodec_get_subtitle_rect_class(void);
*/
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
-#if FF_API_AVFRAME_LAVC
+#if FF_API_AVCODEC_FRAME
/**
* @deprecated use av_frame_alloc()
*/
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 22dcc82..a590782 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1262,7 +1262,7 @@ int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
return ret;
}
-#if FF_API_AVFRAME_LAVC
+#if FF_API_AVCODEC_FRAME
void avcodec_get_frame_defaults(AVFrame *frame)
{
#if LIBAVCODEC_VERSION_MAJOR >= 55
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 1b37a9e..c903d2f 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -181,6 +181,9 @@
#ifndef FF_API_AUDIOENC_DELAY
#define FF_API_AUDIOENC_DELAY (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
+#ifndef FF_API_AVCODEC_FRAME
+#define FF_API_AVCODEC_FRAME (LIBAVCODEC_VERSION_MAJOR < 58)
+#endif
#ifndef FF_API_AVCTX_TIMEBASE
#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
--
2.4.6
More information about the ffmpeg-devel
mailing list