From 828881816acbfae0451e038c45e63b6784681daa Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 12 Aug 2015 11:10:45 +0200 Subject: demux: remove redundant demux_chapter.name field Instead, force everyone to use the metadata struct and set a "title" field. This is only a problem for the timeline producers, which set up chapters manually. (They do this because a timeline is a separate struct.) This fixes the behavior of the chapter-metadata property, which never returned a "title" property for e.g. ordered chapters. --- demux/demux_cue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'demux/demux_cue.c') diff --git a/demux/demux_cue.c b/demux/demux_cue.c index cbe06ca5cf..ed3d3d83f3 100644 --- a/demux/demux_cue.c +++ b/demux/demux_cue.c @@ -224,9 +224,10 @@ static void build_timeline(struct timeline *tl) }; chapters[i] = (struct demux_chapter) { .pts = timeline[i].start, - // might want to include other metadata here - .name = talloc_strdup(chapters, tracks[i].title), + .metadata = talloc_zero(tl, struct mp_tags), }; + // might want to include other metadata here + mp_tags_set_str(chapters[i].metadata, "title", tracks[i].title); starttime += duration; } -- cgit v1.2.3