Skip to content

Commit ea857e7

Browse files
committed
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 b51131d commit ea857e7

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

demux/demux_edl.c

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

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

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

0 commit comments

Comments
 (0)