summaryrefslogtreecommitdiffstats
path: root/demux/demux.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-09-07 22:40:12 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:04 +0200
commitb1c202c12fdd2b53f49e7a9ca5c2f4b84733f511 (patch)
tree20d564f9f6e68bd628d236cc6fd2841dcc686e33 /demux/demux.c
parent5c7ecad93a771d71a773cace996afd706bbef3d2 (diff)
downloadmpv-b1c202c12fdd2b53f49e7a9ca5c2f4b84733f511.tar.bz2
mpv-b1c202c12fdd2b53f49e7a9ca5c2f4b84733f511.tar.xz
demux: make demux_open() private
I always wanted to get rid of this, because it makes the ownership rules for the stream pointer really awkward. demux_edl.c was the only remaining user of this. Replace it with a semi-clever idea: the init segment shit can be used to pass the "file" contents as memory block, and "memory://" itself provides an empty stream. I have no idea if this actually works, because I didn't immediately find a test stream (would have to be some youtube DASH shit).
Diffstat (limited to 'demux/demux.c')
-rw-r--r--demux/demux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/demux/demux.c b/demux/demux.c
index 11b8c622e9..a7e30e8628 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -2438,8 +2438,9 @@ static const int d_force[] = {DEMUX_CHECK_FORCE, -1};
// If params->does_not_own_stream==false, this does _not_ free the stream if
// opening fails. But if it succeeds, a later demux_free() call will free the
// stream.
-struct demuxer *demux_open(struct stream *stream, struct demuxer_params *params,
- struct mpv_global *global)
+static struct demuxer *demux_open(struct stream *stream,
+ struct demuxer_params *params,
+ struct mpv_global *global)
{
const int *check_levels = d_normal;
const struct demuxer_desc *check_desc = NULL;