diff options
author | wm4 <wm4@nowhere> | 2015-02-04 21:20:41 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-04 23:04:21 +0100 |
commit | 59dc351772e95742600979886591401923aceb25 (patch) | |
tree | c601df794f0fea14f2ffd1e98e9c7809ee8605c5 /player/loadfile.c | |
parent | f8dc5db315ce3ec3c3e9c8532f1290967bbe2336 (diff) | |
download | mpv-59dc351772e95742600979886591401923aceb25.tar.bz2 mpv-59dc351772e95742600979886591401923aceb25.tar.xz |
player: move timeline specific handling to timeline loaders
In particular, gets rid of the Matroska specifics from the common code.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r-- | player/loadfile.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/player/loadfile.c b/player/loadfile.c index 4f8b512e86..5b67618611 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1067,6 +1067,8 @@ goto_reopen_demuxer: ; goto terminate_playback; } + mpctx->track_layout = mpctx->demuxer; + if (mpctx->demuxer->matroska_data.ordered_chapters) build_ordered_chapter_timeline(mpctx); @@ -1078,20 +1080,6 @@ goto_reopen_demuxer: ; print_timeline(mpctx); load_chapters(mpctx); - - mpctx->track_layout = mpctx->demuxer; - if (mpctx->timeline) { - // With Matroska, the "master" file usually dictates track layout etc. - // On the contrary, the EDL and CUE demuxers are empty wrappers, as - // well as Matroska ordered chapter playlist-like files. - mpctx->track_layout = mpctx->timeline[0].source; - for (int n = 0; n < mpctx->num_timeline_parts; n++) { - if (mpctx->timeline[n].source == mpctx->demuxer) { - mpctx->track_layout = mpctx->demuxer; - break; - } - } - } add_demuxer_tracks(mpctx, mpctx->track_layout); mpctx->timeline_part = 0; |