diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-18 13:00:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-18 13:00:50 +0200 |
commit | 68c05185e229b093bf5c2236c2883cbc296ea938 (patch) | |
tree | a9be3ada3ccf90ecf227295f5d60f314aa176d9c /libavcodec/avcodec.h | |
parent | ff17d8b56ec87fe1516ddd49b0bdea81f22904af (diff) | |
parent | fd056029f45a9f6d213d9fce8165632042511d4f (diff) | |
download | ffmpeg-68c05185e229b093bf5c2236c2883cbc296ea938.tar.gz |
Merge commit 'fd056029f45a9f6d213d9fce8165632042511d4f'
* commit 'fd056029f45a9f6d213d9fce8165632042511d4f':
lavc: add avcodec_free_context().
Conflicts:
doc/APIchanges
libavcodec/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 9a24c96633..45a9a7de20 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3455,9 +3455,8 @@ void avcodec_register(AVCodec *codec); void avcodec_register_all(void); /** - * Allocate an AVCodecContext and set its fields to default values. The - * resulting struct can be deallocated by calling avcodec_close() on it followed - * by av_free(). + * Allocate an AVCodecContext and set its fields to default values. The + * resulting struct should be freed with avcodec_free_context(). * * @param codec if non-NULL, allocate private data and initialize defaults * for the given codec. It is illegal to then call avcodec_open2() @@ -3472,6 +3471,12 @@ void avcodec_register_all(void); 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 * to the given codec (defaults may be codec-dependent). * |