summaryrefslogtreecommitdiff
path: root/libavformat/aacdec.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/aacdec.c
parent530ac6aa305aeda631c77f8a17e96c14c7ab1a1c (diff)
downloadffmpeg-45bfe8b838275235412777dd430206d9a24eb3ee.tar.gz
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/aacdec.c')
-rw-r--r--libavformat/aacdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/aacdec.c b/libavformat/aacdec.c
index 94e39f592f..1f68f17bc9 100644
--- a/libavformat/aacdec.c
+++ b/libavformat/aacdec.c
@@ -135,7 +135,7 @@ static int adts_aac_read_header(AVFormatContext *s)
static int handle_id3(AVFormatContext *s, AVPacket *pkt)
{
AVDictionary *metadata = NULL;
- AVIOContext ioctx;
+ FFIOContext pb;
ID3v2ExtraMeta *id3v2_extra_meta;
int ret;
@@ -144,8 +144,8 @@ static int handle_id3(AVFormatContext *s, AVPacket *pkt)
return ret;
}
- ffio_init_context(&ioctx, pkt->data, pkt->size, 0, NULL, NULL, NULL, NULL);
- ff_id3v2_read_dict(&ioctx, &metadata, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta);
+ ffio_init_context(&pb, pkt->data, pkt->size, 0, NULL, NULL, NULL, NULL);
+ ff_id3v2_read_dict(&pb.pub, &metadata, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta);
if ((ret = ff_id3v2_parse_priv_dict(&metadata, id3v2_extra_meta)) < 0)
goto error;