Browse Source

Merge commit '943135621830ac3857d3cf766cfc280a95bb3c13'

* commit '943135621830ac3857d3cf766cfc280a95bb3c13':
  lavc: deprecate avcodec_free_frame()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 12 years ago
parent
commit
409a143e4b
2 changed files with 7 additions and 12 deletions
  1. +5
    -0
      libavcodec/avcodec.h
  2. +2
    -12
      libavcodec/utils.c

+ 5
- 0
libavcodec/avcodec.h View File

@@ -3391,6 +3391,7 @@ AVFrame *avcodec_alloc_frame(void);
*/
void avcodec_get_frame_defaults(AVFrame *frame);

#if FF_API_AVFRAME_LAVC
/**
* Free the frame and any dynamically allocated objects in it,
* e.g. extended_data.
@@ -3400,8 +3401,12 @@ void avcodec_get_frame_defaults(AVFrame *frame);
* @warning this function does NOT free the data buffers themselves
* (it does not know how, since they might have been allocated with
* a custom get_buffer()).
*
* @deprecated use av_frame_free()
*/
attribute_deprecated
void avcodec_free_frame(AVFrame **frame);
#endif

/**
* Initialize the AVCodecContext to use the given AVCodec. Prior to using this


+ 2
- 12
libavcodec/utils.c View File

@@ -1087,22 +1087,12 @@ AVFrame *avcodec_alloc_frame(void)

return frame;
}
#endif

void avcodec_free_frame(AVFrame **frame)
{
AVFrame *f;

if (!frame || !*frame)
return;

f = *frame;

if (f->extended_data != f->data)
av_freep(&f->extended_data);

av_freep(frame);
av_frame_free(frame);
}
#endif

MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor)


Loading…
Cancel
Save