From 45bfe8b838275235412777dd430206d9a24eb3ee Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Wed, 4 Aug 2021 16:52:07 +0200 Subject: avformat/avio: Move internal AVIOContext fields to avio_internal.h Currently AVIOContext's private fields are all over AVIOContext. This commit moves them into a new structure in avio_internal.h instead. Said structure contains the public AVIOContext as its first element in order to avoid having to allocate a separate AVIOContextInternal which is costly for those use cases where one just wants to access an already existing buffer via the AVIOContext-API. For these cases ffio_init_context() can't fail and always returned zero, which was typically not checked. Therefore it has been made to not return anything. Signed-off-by: Andreas Rheinhardt --- libavformat/subtitles.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavformat/subtitles.h') diff --git a/libavformat/subtitles.h b/libavformat/subtitles.h index 37ca7b19b1..4460efacf3 100644 --- a/libavformat/subtitles.h +++ b/libavformat/subtitles.h @@ -25,6 +25,7 @@ #include #include "avformat.h" #include "libavutil/bprint.h" +#include "avio_internal.h" enum sub_sort { SUB_SORT_TS_POS = 0, ///< sort by timestamps, then position @@ -42,7 +43,7 @@ typedef struct { AVIOContext *pb; unsigned char buf[8]; int buf_pos, buf_len; - AVIOContext buf_pb; + FFIOContext buf_pb; } FFTextReader; /** -- cgit v1.2.3