]> git.sesse.net Git - ffmpeg/commit
lavf: allow custom IO for all files
authorAnton Khirnov <anton@khirnov.net>
Sat, 16 Jan 2016 16:53:43 +0000 (17:53 +0100)
committerAnton Khirnov <anton@khirnov.net>
Sun, 24 Jan 2016 15:45:32 +0000 (16:45 +0100)
commit9f61abc8111c7c43f49ca012e957a108b9cc7610
tree87af58cf56a1298f4b9b6a242d9c3a9451388ec8
parent68395f8c99393c281a08139d20a7a04398b2fd04
lavf: allow custom IO for all files

Some (de)muxers open additional files beyond the main IO context.
Currently, they call avio_open() directly, which prevents the caller
from using custom IO for such streams.

This commit adds callbacks to AVFormatContext that default to
avio_open2()/avio_close(), but can be overridden by the caller. All
muxers and demuxers using AVIO are switched to using those callbacks
instead of calling avio_open()/avio_close() directly.

(de)muxers that use the URLProtocol layer directly instead of AVIO
remain unconverted for now. This should be fixed in later commits.
15 files changed:
doc/APIchanges
libavformat/avformat.h
libavformat/dashenc.c
libavformat/hdsenc.c
libavformat/hls.c
libavformat/hlsenc.c
libavformat/img2dec.c
libavformat/img2enc.c
libavformat/internal.h
libavformat/mov.c
libavformat/movenc.c
libavformat/options.c
libavformat/segment.c
libavformat/smoothstreamingenc.c
libavformat/utils.c