Skip to content

Commit f4dcd29

Browse files
guidocellakasper93
authored andcommitted
demux_edl: support global_tags with delay_open
The delay_open mechanism used by --script-opt=ytdl_hook-all_formats=yes breaks setting metadata with global_tags because tl->track_layout is NULL. See adcf51d cbb8f53 8ea7aa5. Fix this by applying tags to the EDL timeline in this case. Tags must still be applied to tl->track_layout when available for them to work with local EDL files.
1 parent cc8f3bf commit f4dcd29

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

demux/demux_edl.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,12 +561,11 @@ static struct timeline_par *build_timeline(struct timeline *root,
561561
if (!tl->track_layout && !tl->delay_open)
562562
goto error;
563563
if (!root->meta)
564-
root->meta = tl->track_layout;
564+
root->meta = tl->track_layout ? tl->track_layout : root->demuxer;
565565

566566
// Not very sane, since demuxer fields are supposed to be treated read-only
567567
// from outside, but happens to work in this case, so who cares.
568-
if (root->meta)
569-
mp_tags_merge(root->meta->metadata, edl_root->tags);
568+
mp_tags_merge(root->meta->metadata, edl_root->tags);
570569

571570
mp_assert(tl->num_parts == parts->num_parts);
572571
return tl;

player/lua/ytdl_hook.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ local tag_list = {
6262
["release_year"] = "ytdl_release_year",
6363
["description"] = "ytdl_description",
6464
-- "title" is handled by force-media-title
65-
-- tags don't work with all_formats=yes
6665
}
6766

6867
local safe_protos = Set {

0 commit comments

Comments
 (0)