summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-20 20:02:58 +0200
committerwm4 <wm4@nowhere>2014-07-20 20:13:08 +0200
commit61efe87e48d3c929b9a88328a63820307d133d04 (patch)
tree67fb51cc18be8d2892e6f921d7f99201c849d68b /player/core.h
parentd320695207abe9c77dff9ce1181c6db7bc2d6b27 (diff)
downloadmpv-61efe87e48d3c929b9a88328a63820307d133d04.tar.bz2
mpv-61efe87e48d3c929b9a88328a63820307d133d04.tar.xz
player: fix regression with ordered chapters
Broken by commit 1301a907. This commit added demuxer threading, and changed some other things to make them simpler and more orthogonal. One of these things was ntofications about streams that appear during playback. That's an obscure corner case, but the change made handling of it as natural as normal initialization. This didn't work for two reasons: 1. When playing an ordered chapters file where the initial segment was not from the main file, its streams were added to the track list. So they were printed twice, and switching to the next segment didn't work, because the right streams were not selected. 2. EDL, CUE, as well as possibly certain Matroska files don't have any data or tracks in the "main" demuxer, so normally the first segment is picked for the track list. This was simply broken. Fix by sprinkling the code with various hacks.
Diffstat (limited to 'player/core.h')
-rw-r--r--player/core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/player/core.h b/player/core.h
index 013a645e8b..adb9185da0 100644
--- a/player/core.h
+++ b/player/core.h
@@ -125,6 +125,9 @@ struct track {
// If the track's stream changes with the timeline (ordered chapters).
bool under_timeline;
+ // Does not change with under_timeline, but it useless for most purposes.
+ struct sh_stream *original_stream;
+
// Value can change if under_timeline==true.
struct demuxer *demuxer;
// Invariant: !stream || stream->demuxer == demuxer
@@ -221,6 +224,7 @@ typedef struct MPContext {
// Uses: accessing metadata (consider ordered chapters case, where the main
// demuxer defines metadata), or special purpose demuxers like TV.
struct demuxer *master_demuxer;
+ struct demuxer *track_layout; // complication for ordered chapters
struct mixer *mixer;
struct ao *ao;