Commit b9fb59d2 authored by Anton Khirnov's avatar Anton Khirnov

lavc: deprecate avcodec_alloc_frame().

parent 5b9c3b45
......@@ -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.
......
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment