demux: enable --stream-record for things using timeline

Although this is not useful in general, it makes --stream-record work
with a certain video streaming service by a large dystopian company.

In the general case, this fails because normal muxing can, quite
obviously, not handle the segmented metadata in the packets. (There
isn't even a file format which could handle these, except possibly mp4.)
On the other hand, ytdl merely uses timeline/EDL to emulate DASH
streaming (unfortunately), which does not use the segmented stuff, and
stream recording will actually work.
This commit is contained in:
wm4 2019-06-30 17:07:08 +02:00
parent 943fc88989
commit 8a48a277ed
1 changed files with 2 additions and 0 deletions

View File

@ -3099,6 +3099,7 @@ static struct demuxer *open_given_type(struct mpv_global *global,
struct demuxer_params params2 = {0};
params2.timeline = tl;
params2.is_top_level = params && params->is_top_level;
params2.stream_record = params && params->stream_record;
sub =
open_given_type(global, log, &demuxer_desc_timeline,
NULL, sinfo, &params2, DEMUX_CHECK_FORCE);
@ -3111,6 +3112,7 @@ static struct demuxer *open_given_type(struct mpv_global *global,
in->seekable_cache = false;
in->min_secs = 0;
in->max_bytes = 1;
in->enable_recording = false;
}
if (in->seekable_cache && opts->disk_cache) {