[FFmpeg-devel] [PATCH 2/7] avcodec/avcodec: Document current behaviour of subtitle_header
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Mon Apr 19 05:06:09 EEST 2021
Mention that avcodec_free_context() always frees it even when
encoding. And mention that freeing is of course performed in
avcodec_close() when decoding and not necessarily in avcodec_open2().
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/avcodec.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 8a71c04230..9b68aecd31 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2011,7 +2011,9 @@ typedef struct AVCodecContext {
* [Script Info] and [V4+ Styles] section, plus the [Events] line and
* the Format line following. It shouldn't include any Dialogue line.
* - encoding: Set/allocated/freed by user (before avcodec_open2())
- * - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())
+ * - decoding: Set/allocated/freed by libavcodec (by avcodec_open2()
+ * resp. avcodec_close())
+ * Furthermore, avcodec_free_context() always frees it even when encoding.
*/
uint8_t *subtitle_header;
int subtitle_header_size;
--
2.27.0
More information about the ffmpeg-devel
mailing list