]> git.sesse.net Git - ffmpeg/commitdiff
lavc: deprecate avcodec_alloc_frame().
authorAnton Khirnov <anton@khirnov.net>
Sat, 9 Nov 2013 09:09:21 +0000 (10:09 +0100)
committerAnton Khirnov <anton@khirnov.net>
Sat, 16 Nov 2013 11:44:50 +0000 (12:44 +0100)
libavcodec/avcodec.h
libavcodec/utils.c

index 05516bd38e9d9a4e11419d55d5605311022c1fca..e1315c2eb4b7c8c58cd4623c2961855376abe8ae 100644 (file)
@@ -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.
index da50e4268ce775a1587fe411106481c5587c4092..d21ca0eeceec186b67ce2d6788034e1b87fe3126 100644 (file)
@@ -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)
 {