lavc: add avcodec_free_context().

Right now, the caller has to manually manage some allocated
AVCodecContext fields, like extradata or subtitle_header. This is
fragile and prone to leaks, especially if we want to add more such
fields in the future.

The only reason for this behaviour is so that the AVStream codec context
can be reused for decoding. Such reuse is discouraged anyway, so this
commit is the first step to deprecating it.
This commit is contained in:
Anton Khirnov
2014-04-05 08:36:00 +02:00
parent e1b66778b6
commit fd056029f4
4 changed files with 28 additions and 4 deletions

View File

@@ -13,6 +13,10 @@ libavutil: 2013-12-xx
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 - lavf 55.17.0 - avformat.h
Add AVMFT_FLAG_BITEXACT flag. Muxers now use it instead of checking
CODEC_FLAG_BITEXACT on the first stream.