From 94bfe833559e5426d2c8b51db321f2b1dd28bd0e Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 20 Sep 2019 17:01:35 +0200 Subject: demux: propagate streaming flag through demux_timeline Before this commit, EDL or CUE files did not properly enable the cache if they were on "slow" media (stream->streaming==true). This happened because the stream is unset for demux_timeline, so the streaming flag could not be queried anymore. Fix this by adding this flag to struct demuxer, and propagate it exactly like the is_network flag. is_network is not used for checking the cache options anymore, and its main function seems to be something else. Normal http streams set the streaming flag already. This should fix #6958. --- demux/demux_timeline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'demux/demux_timeline.c') diff --git a/demux/demux_timeline.c b/demux/demux_timeline.c index 8237a69a0f..b18ae70faa 100644 --- a/demux/demux_timeline.c +++ b/demux/demux_timeline.c @@ -591,8 +591,10 @@ static bool add_tl(struct demuxer *demuxer, struct timeline_par *tl) // demux_timeline already does caching, doing it for the sub-demuxers // would be pointless and wasteful. - if (part->source) + if (part->source) { demuxer->is_network |= part->source->is_network; + demuxer->is_streaming |= part->source->is_streaming; + } struct segment *seg = talloc_ptrtype(src, seg); *seg = (struct segment){ @@ -611,6 +613,7 @@ static bool add_tl(struct demuxer *demuxer, struct timeline_par *tl) } demuxer->is_network |= tl->track_layout->is_network; + demuxer->is_streaming |= tl->track_layout->is_streaming; return true; } -- cgit v1.2.3