]> git.sesse.net Git - ffmpeg/commit
avformat/aviobuf: Remove AVIOInternal and one level of indirection
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 6 Jan 2020 14:51:48 +0000 (15:51 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 30 Jan 2020 17:47:21 +0000 (18:47 +0100)
commit6e8e8431e15a58aa44cfdd8c11f9ea096837c0fa
tree499b72d17da5aeb4275fcf4a533596b41313fd74
parent0a275fec623f85d5f08bd65ed5ce89aa8be4f38d
avformat/aviobuf: Remove AVIOInternal and one level of indirection

In the Libav commit cae448cf, the opaque of every AVIOContext opened
by ffio_fdopen() (which is used internally by avio_open() and avio_open2())
changed: It was a simple pointer to an URLContext before, but now it was
a structure (namely AVIOInternal) containing a pointer to an URLContext
as its only member. The next commits (namely 8c0ceafb and ec4c4839) added
members to AVIOInternal to allow white-/blacklisting of protocols.

But these two commits were never merged into FFmpeg (they were only
merged as no-ops in 510046c2 and 063b26d3), because FFmpeg chose
a different way to implement this (in 93629735); and so our AVIOInternal
still has exactly one member.

This of course means that it is unnecessary to use AVIOInternal as
opaque as it is just adding a level of indirection (not only pointer
dereference, but also wrapper functions). Therefore this commit
removes AVIOInternal entirely and essentially reverts cae448cf.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/aviobuf.c