mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-16 03:50:05 +01:00
libavformat: Add a function for freeing an AVFormatContext
This function is useful for freeing data structures allocated by
muxers, which currently have to be freed manually by the caller.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit f124b087ee)
This commit is contained in:
committed by
Michael Niedermayer
parent
173f19be75
commit
4ed68fdfdc
@@ -1074,8 +1074,8 @@ attribute_deprecated AVFormatContext *av_alloc_format_context(void);
|
||||
|
||||
/**
|
||||
* Allocate an AVFormatContext.
|
||||
* Can be freed with av_free() but do not forget to free everything you
|
||||
* explicitly allocated as well!
|
||||
* avformat_free_context() can be used to free the context and everything
|
||||
* allocated by the framework within it.
|
||||
*/
|
||||
AVFormatContext *avformat_alloc_context(void);
|
||||
|
||||
@@ -1231,6 +1231,12 @@ void av_close_input_stream(AVFormatContext *s);
|
||||
*/
|
||||
void av_close_input_file(AVFormatContext *s);
|
||||
|
||||
/**
|
||||
* Free an AVFormatContext and all its streams.
|
||||
* @param s context to free
|
||||
*/
|
||||
void avformat_free_context(AVFormatContext *s);
|
||||
|
||||
/**
|
||||
* Add a new stream to a media file.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user