summaryrefslogtreecommitdiffstats
path: root/demux/demux_mkv_timeline.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-06-20 13:57:58 +0200
committerwm4 <wm4@nowhere>2017-06-20 14:22:10 +0200
commit1890529857a3b963df476f53ca41faacab48a6d2 (patch)
treecad31a2b753e5aa2040dd8d8d8adc34ececebea0 /demux/demux_mkv_timeline.c
parent5bfbe6dfde01704979dd086d5184ea2e697cb510 (diff)
downloadmpv-1890529857a3b963df476f53ca41faacab48a6d2.tar.bz2
mpv-1890529857a3b963df476f53ca41faacab48a6d2.tar.xz
demux: get rid of DEMUXER_CTRL_GET_TIME_LENGTH
Similar purpose as f34e1a0deea45e. Somehow this is much more natural too, and needs less code. This breaks runtime updates to duration. This could easily be fixed, but no important demuxer does this anyway. Only demux_raw and demux_disc might (the latter for BD/DVD). For the latter it might actually have some importance when changing titles at runtime (I guess?), but guess what, I don't care.
Diffstat (limited to 'demux/demux_mkv_timeline.c')
-rw-r--r--demux/demux_mkv_timeline.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/demux/demux_mkv_timeline.c b/demux/demux_mkv_timeline.c
index de7b2e0853..3ad24eb8a5 100644
--- a/demux/demux_mkv_timeline.c
+++ b/demux/demux_mkv_timeline.c
@@ -384,8 +384,7 @@ static void build_timeline_loop(struct tl_ctx *ctx,
/* If we're the source or it's a non-ordered edition reference,
* just add a timeline part from the source. */
if (current_source == j || !linked_m->uid.edition) {
- uint64_t source_full_length =
- demuxer_get_time_length(linked_source) * 1e9;
+ uint64_t source_full_length = linked_source->duration * 1e9;
uint64_t source_length = source_full_length - c->start;
int64_t join_diff = 0;