summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-01-01 16:18:48 +0100
committerwm4 <wm4@nowhere>2014-01-01 16:18:54 +0100
commitaeb9e6ddf55370523ca29623c7def72512597423 (patch)
tree04fa450228c941d85906716c17ea96c77c3fd809 /player
parent66fe4f571371b06b84c9e9cd684df9f7fc90b53f (diff)
downloadmpv-aeb9e6ddf55370523ca29623c7def72512597423.tar.bz2
mpv-aeb9e6ddf55370523ca29623c7def72512597423.tar.xz
player: fix DVD playback
Crashed in case of lazily added subtitle streams, which add tracks with track->stream set to NULL. Fixes gituhub issue #439.
Diffstat (limited to 'player')
-rw-r--r--player/loadfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index 402b30c5be..14faeb08c9 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -281,7 +281,7 @@ void reselect_demux_streams(struct MPContext *mpctx)
// Note: we assume that all demuxer streams are covered by the track list.
for (int t = 0; t < mpctx->num_tracks; t++) {
struct track *track = mpctx->tracks[t];
- if (track->demuxer)
+ if (track->demuxer && track->stream)
demuxer_select_track(track->demuxer, track->stream, track->selected);
}
}