mirror of
https://github.com/mpv-player/mpv
synced 2025-01-12 01:49:33 +00:00
demux_mkv: don't recursively resolve timeline for opened reference files
Instead, resolve all references and so on in the top-level timeline.
This commit is contained in:
parent
1bf474e19a
commit
3a78eefc88
@ -1287,16 +1287,18 @@ static struct demuxer *open_given_type(struct mpv_global *global,
|
||||
demux_changed(in->d_thread, DEMUX_EVENT_ALL);
|
||||
demux_update(demuxer);
|
||||
stream_control(demuxer->stream, STREAM_CTRL_SET_READAHEAD, &(int){false});
|
||||
struct timeline *tl = timeline_load(global, log, demuxer);
|
||||
if (tl) {
|
||||
struct demuxer_params params2 = {0};
|
||||
params2.timeline = tl;
|
||||
struct demuxer *sub = open_given_type(global, log,
|
||||
&demuxer_desc_timeline, stream,
|
||||
¶ms2, DEMUX_CHECK_FORCE);
|
||||
if (sub)
|
||||
return sub;
|
||||
timeline_destroy(tl);
|
||||
if (!(params && params->disable_timeline)) {
|
||||
struct timeline *tl = timeline_load(global, log, demuxer);
|
||||
if (tl) {
|
||||
struct demuxer_params params2 = {0};
|
||||
params2.timeline = tl;
|
||||
struct demuxer *sub =
|
||||
open_given_type(global, log, &demuxer_desc_timeline, stream,
|
||||
¶ms2, DEMUX_CHECK_FORCE);
|
||||
if (sub)
|
||||
return sub;
|
||||
timeline_destroy(tl);
|
||||
}
|
||||
}
|
||||
return demuxer;
|
||||
}
|
||||
|
@ -161,6 +161,7 @@ struct demuxer_params {
|
||||
int matroska_wanted_segment;
|
||||
bool *matroska_was_valid;
|
||||
struct timeline *timeline;
|
||||
bool disable_timeline;
|
||||
// -- demux_open_url() only
|
||||
int stream_flags;
|
||||
bool allow_capture;
|
||||
|
@ -170,6 +170,7 @@ static bool check_file_seg(struct tl_ctx *ctx, char *filename, int segment)
|
||||
.matroska_wanted_uids = ctx->uids,
|
||||
.matroska_wanted_segment = segment,
|
||||
.matroska_was_valid = &was_valid,
|
||||
.disable_timeline = true,
|
||||
.disable_cache = true,
|
||||
};
|
||||
struct mp_cancel *cancel = ctx->tl->cancel;
|
||||
|
Loading…
Reference in New Issue
Block a user