diff options
author | wm4 <wm4@nowhere> | 2015-08-12 11:10:45 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-12 11:11:23 +0200 |
commit | 828881816acbfae0451e038c45e63b6784681daa (patch) | |
tree | 204b590332a95f2e5778a3e184b676e0e719ac4c /demux/demux.c | |
parent | c7329e5118d4e26d02f74fed66747392916ceae7 (diff) | |
download | mpv-828881816acbfae0451e038c45e63b6784681daa.tar.bz2 mpv-828881816acbfae0451e038c45e63b6784681daa.tar.xz |
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.
Diffstat (limited to 'demux/demux.c')
-rw-r--r-- | demux/demux.c | 5 |
1 files changed, 1 insertions, 4 deletions
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; } |