summaryrefslogtreecommitdiffstats
path: root/demux/demux_mkv_timeline.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-19 14:41:06 +0200
committerwm4 <wm4@nowhere>2018-05-24 19:56:35 +0200
commitd33e5972b38c1a8d1ed2c19095a94c70c33881c3 (patch)
tree40b2ff985f51f53505ddd5985df4abe2ba97eced /demux/demux_mkv_timeline.c
parent562d8e6d3236022a77e49a17948e25e493538f04 (diff)
downloadmpv-d33e5972b38c1a8d1ed2c19095a94c70c33881c3.tar.bz2
mpv-d33e5972b38c1a8d1ed2c19095a94c70c33881c3.tar.xz
demux: get rid of free_demuxer[_and_stream]()
Them being separate is just dumb. Replace them with a single demux_free() function, and free its stream by default. Not freeing the stream is only needed in 1 special case (demux_disc.c), use a special flag to not free the stream in this case.
Diffstat (limited to 'demux/demux_mkv_timeline.c')
-rw-r--r--demux/demux_mkv_timeline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/demux/demux_mkv_timeline.c b/demux/demux_mkv_timeline.c
index 48d8c444b3..2a02a35dc5 100644
--- a/demux/demux_mkv_timeline.c
+++ b/demux/demux_mkv_timeline.c
@@ -217,7 +217,7 @@ static bool check_file_seg(struct tl_ctx *ctx, char *filename, int segment)
}
if (stream_wants_cache(d->stream, ctx->opts->stream_cache)) {
- free_demuxer_and_stream(d);
+ demux_free(d);
params.disable_cache = false;
params.matroska_wanted_uids = ctx->uids; // potentially reallocated, same data
d = demux_open_url(filename, &params, cancel, ctx->global);
@@ -230,7 +230,7 @@ static bool check_file_seg(struct tl_ctx *ctx, char *filename, int segment)
}
}
- free_demuxer_and_stream(d);
+ demux_free(d);
return was_valid;
}