summaryrefslogtreecommitdiff
path: root/libavformat/av1.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-04 16:52:07 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-25 23:01:54 +0200
commit45bfe8b838275235412777dd430206d9a24eb3ee (patch)
treed35a1ee7436b0259fd26d32bc80482c0a9f2927e /libavformat/av1.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/av1.c')
-rw-r--r--libavformat/av1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/av1.c b/libavformat/av1.c
index 5512c4e0f7..1fcfac2356 100644
--- a/libavformat/av1.c
+++ b/libavformat/av1.c
@@ -86,7 +86,7 @@ int ff_av1_filter_obus(AVIOContext *pb, const uint8_t *buf, int size)
int ff_av1_filter_obus_buf(const uint8_t *in, uint8_t **out,
int *size, int *offset)
{
- AVIOContext pb;
+ FFIOContext pb;
uint8_t *buf;
int len, off, ret;
@@ -108,7 +108,7 @@ int ff_av1_filter_obus_buf(const uint8_t *in, uint8_t **out,
ffio_init_context(&pb, buf, len, 1, NULL, NULL, NULL, NULL);
- ret = av1_filter_obus(&pb, in, *size, NULL);
+ ret = av1_filter_obus(&pb.pub, in, *size, NULL);
av_assert1(ret == len);
memset(buf + len, 0, AV_INPUT_BUFFER_PADDING_SIZE);