Merge commit 'fd056029f45a9f6d213d9fce8165632042511d4f'
* commit 'fd056029f45a9f6d213d9fce8165632042511d4f': lavc: add avcodec_free_context(). Conflicts: doc/APIchanges libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -15,6 +15,10 @@ libavutil: 2012-10-22
|
|||||||
|
|
||||||
API changes, most recent first:
|
API changes, most recent first:
|
||||||
|
|
||||||
|
2014-04-xx - xxxxxxx - lavc 55.52.0 - avcodec.h
|
||||||
|
Add avcodec_free_context(). From now on it should be used for freeing
|
||||||
|
AVCodecContext.
|
||||||
|
|
||||||
2014-05-xx - xxxxxxx - lavu 52.84.100 - time.h
|
2014-05-xx - xxxxxxx - lavu 52.84.100 - time.h
|
||||||
Add av_gettime_relative() av_gettime_relative_is_monotonic()
|
Add av_gettime_relative() av_gettime_relative_is_monotonic()
|
||||||
|
|
||||||
|
@@ -3455,9 +3455,8 @@ void avcodec_register(AVCodec *codec);
|
|||||||
void avcodec_register_all(void);
|
void avcodec_register_all(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allocate an AVCodecContext and set its fields to default values. The
|
* Allocate an AVCodecContext and set its fields to default values. The
|
||||||
* resulting struct can be deallocated by calling avcodec_close() on it followed
|
* resulting struct should be freed with avcodec_free_context().
|
||||||
* by av_free().
|
|
||||||
*
|
*
|
||||||
* @param codec if non-NULL, allocate private data and initialize defaults
|
* @param codec if non-NULL, allocate private data and initialize defaults
|
||||||
* for the given codec. It is illegal to then call avcodec_open2()
|
* for the given codec. It is illegal to then call avcodec_open2()
|
||||||
@@ -3471,6 +3470,12 @@ void avcodec_register_all(void);
|
|||||||
*/
|
*/
|
||||||
AVCodecContext *avcodec_alloc_context3(const AVCodec *codec);
|
AVCodecContext *avcodec_alloc_context3(const AVCodec *codec);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Free the codec context and everything associated with it and write NULL to
|
||||||
|
* the provided pointer.
|
||||||
|
*/
|
||||||
|
void avcodec_free_context(AVCodecContext **avctx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the fields of the given AVCodecContext to default values corresponding
|
* Set the fields of the given AVCodecContext to default values corresponding
|
||||||
* to the given codec (defaults may be codec-dependent).
|
* to the given codec (defaults may be codec-dependent).
|
||||||
|
@@ -154,6 +154,21 @@ AVCodecContext *avcodec_alloc_context3(const AVCodec *codec)
|
|||||||
return avctx;
|
return avctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void avcodec_free_context(AVCodecContext **pavctx)
|
||||||
|
{
|
||||||
|
AVCodecContext *avctx = *pavctx;
|
||||||
|
|
||||||
|
if (!avctx)
|
||||||
|
return;
|
||||||
|
|
||||||
|
avcodec_close(avctx);
|
||||||
|
|
||||||
|
av_freep(&avctx->extradata);
|
||||||
|
av_freep(&avctx->subtitle_header);
|
||||||
|
|
||||||
|
av_freep(pavctx);
|
||||||
|
}
|
||||||
|
|
||||||
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
|
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
|
||||||
{
|
{
|
||||||
const AVCodec *orig_codec = dest->codec;
|
const AVCodec *orig_codec = dest->codec;
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include "libavutil/version.h"
|
#include "libavutil/version.h"
|
||||||
|
|
||||||
#define LIBAVCODEC_VERSION_MAJOR 55
|
#define LIBAVCODEC_VERSION_MAJOR 55
|
||||||
#define LIBAVCODEC_VERSION_MINOR 62
|
#define LIBAVCODEC_VERSION_MINOR 63
|
||||||
#define LIBAVCODEC_VERSION_MICRO 100
|
#define LIBAVCODEC_VERSION_MICRO 100
|
||||||
|
|
||||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||||
|
Reference in New Issue
Block a user