diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-04 16:52:07 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-25 23:01:54 +0200 |
commit | 45bfe8b838275235412777dd430206d9a24eb3ee (patch) | |
tree | d35a1ee7436b0259fd26d32bc80482c0a9f2927e /libavformat/sapdec.c | |
parent | 530ac6aa305aeda631c77f8a17e96c14c7ab1a1c (diff) | |
download | ffmpeg-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/sapdec.c')
-rw-r--r-- | libavformat/sapdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/sapdec.c b/libavformat/sapdec.c index a852b0782b..fd0e662433 100644 --- a/libavformat/sapdec.c +++ b/libavformat/sapdec.c @@ -35,7 +35,7 @@ struct SAPState { URLContext *ann_fd; AVFormatContext *sdp_ctx; - AVIOContext sdp_pb; + FFIOContext sdp_pb; uint16_t hash; char *sdp; int eof; @@ -160,7 +160,7 @@ static int sap_read_header(AVFormatContext *s) goto fail; } sap->sdp_ctx->max_delay = s->max_delay; - sap->sdp_ctx->pb = &sap->sdp_pb; + sap->sdp_ctx->pb = &sap->sdp_pb.pub; sap->sdp_ctx->interrupt_callback = s->interrupt_callback; if ((ret = ff_copy_whiteblacklists(sap->sdp_ctx, s)) < 0) |