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.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'demux/demux.c') diff --git a/demux/demux.c b/demux/demux.c index fedc533926..4c4a399c9f 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -1271,7 +1271,6 @@ int demuxer_add_chapter(demuxer_t *demuxer, char *name, struct demux_chapter new = { .original_index = demuxer->num_chapters, .pts = pts, - .name = talloc_strdup(demuxer, name), .metadata = talloc_zero(demuxer, struct mp_tags), .demuxer_id = demuxer_id, }; @@ -1511,9 +1510,7 @@ struct demux_chapter *demux_copy_chapter_data(struct demux_chapter *c, int num) struct demux_chapter *new = talloc_array(NULL, struct demux_chapter, num); for (int n = 0; n < num; n++) { new[n] = c[n]; - new[n].name = talloc_strdup(new, new[n].name); - if (new[n].metadata) - new[n].metadata = mp_tags_dup(new, new[n].metadata); + new[n].metadata = mp_tags_dup(new, new[n].metadata); } return new; } -- cgit v1.2.3