Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-04 17:52:07 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-26 00:01:54 +0300
commit45bfe8b838275235412777dd430206d9a24eb3ee (patch)
treed35a1ee7436b0259fd26d32bc80482c0a9f2927e /libavformat/oggenc.c
parent530ac6aa305aeda631c77f8a17e96c14c7ab1a1c (diff)
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 <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/oggenc.c')
-rw-r--r--libavformat/oggenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index aff0ca6b96..a88dab8ccc 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -275,7 +275,7 @@ static uint8_t *ogg_write_vorbiscomment(int64_t offset, int bitexact,
AVChapter **chapters, unsigned int nb_chapters)
{
const char *vendor = bitexact ? "ffmpeg" : LIBAVFORMAT_IDENT;
- AVIOContext pb;
+ FFIOContext pb;
int64_t size;
uint8_t *p;
@@ -289,9 +289,9 @@ static uint8_t *ogg_write_vorbiscomment(int64_t offset, int bitexact,
return NULL;
ffio_init_context(&pb, p + offset, size - offset, 1, NULL, NULL, NULL, NULL);
- ff_vorbiscomment_write(&pb, *m, vendor, chapters, nb_chapters);
+ ff_vorbiscomment_write(&pb.pub, *m, vendor, chapters, nb_chapters);
if (framing_bit)
- avio_w8(&pb, 1);
+ avio_w8(&pb.pub, 1);
*header_len = size;
return p;