summaryrefslogtreecommitdiffstats
path: root/demux/demux_timeline.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-08 23:55:05 +0200
committerwm4 <wm4@nowhere>2019-10-08 23:55:05 +0200
commit5cbbd250908099b94cfaf7853adf8d5a5bb346e1 (patch)
tree9f9b50db22e1c5beab381c381458b4589d24d4fe /demux/demux_timeline.c
parent68bbc55eda2de7d54ebbad394b8eb6994f3fdeef (diff)
downloadmpv-5cbbd250908099b94cfaf7853adf8d5a5bb346e1.tar.bz2
mpv-5cbbd250908099b94cfaf7853adf8d5a5bb346e1.tar.xz
demux_timeline, demux_edl: correctly enable cache in pseudo-DASH mode
In pseudo-DASH mode, we may have no real streams opened until the demuxer layer is fully loaded and playback actually starts. The only hint that the stream is from network is, at that point, the init segment, which is only opened as stream, and then separately as demuxer (which is dumb but happened to fit the internal architecture better). So just propagate the flags from the init segment stream. Seems like an annoyance, but doesn't hurt that much I guess. (Until someone gets the idea to pass the init segment data inline or so, but nothing does that.) The sample link in the linked issue will probably soon switch to another format, because that service always does this after recent uploads or so. Fixes: #7038
Diffstat (limited to 'demux/demux_timeline.c')
-rw-r--r--demux/demux_timeline.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/demux/demux_timeline.c b/demux/demux_timeline.c
index b18ae70faa..aefca9f1c9 100644
--- a/demux/demux_timeline.c
+++ b/demux/demux_timeline.c
@@ -525,6 +525,9 @@ static int d_open(struct demuxer *demuxer, enum demux_check check)
if (!p->num_sources)
return -1;
+ demuxer->is_network |= p->tl->is_network;
+ demuxer->is_streaming |= p->tl->is_streaming;
+
demuxer->duration = p->duration;
print_timeline(demuxer);