[FFmpeg-cvslog] lavc: deprecate avcodec_alloc_frame().
Anton Khirnov
git at videolan.org
Sun Nov 17 00:10:23 CET 2013
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Nov 9 10:09:21 2013 +0100| [b9fb59d2ab05fdfe89d3fb0d7ecbbd91e560f57d] | committer: Anton Khirnov
lavc: deprecate avcodec_alloc_frame().
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b9fb59d2ab05fdfe89d3fb0d7ecbbd91e560f57d
---
libavcodec/avcodec.h | 9 ++++-----
libavcodec/utils.c | 2 ++
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 05516bd..e1315c2 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3096,14 +3096,13 @@ const AVClass *avcodec_get_class(void);
*/
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
+#if FF_API_AVFRAME_LAVC
/**
- * Allocate an AVFrame and set its fields to default values. The resulting
- * struct must be freed using avcodec_free_frame().
- *
- * @return An AVFrame filled with default values or NULL on failure.
- * @see avcodec_get_frame_defaults
+ * @deprecated use av_frame_alloc()
*/
+attribute_deprecated
AVFrame *avcodec_alloc_frame(void);
+#endif
/**
* Set the fields of the given AVFrame to default values.
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index da50e42..d21ca0e 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -815,6 +815,7 @@ void avcodec_get_frame_defaults(AVFrame *frame)
frame->extended_data = frame->data;
}
+#if FF_API_AVFRAME_LAVC
AVFrame *avcodec_alloc_frame(void)
{
AVFrame *frame = av_mallocz(sizeof(AVFrame));
@@ -826,6 +827,7 @@ AVFrame *avcodec_alloc_frame(void)
return frame;
}
+#endif
void avcodec_free_frame(AVFrame **frame)
{
More information about the ffmpeg-cvslog
mailing list