diff options
author | wm4 <wm4@nowhere> | 2014-11-02 17:20:04 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-02 17:29:41 +0100 |
commit | 969757baa0af99d905a9b8c99f0c92efa4e0fb33 (patch) | |
tree | 2db51b2e3bc89dce550fc1c9fbf31c7471a41fce /player/timeline/tl_cue.c | |
parent | 1cebd16350229d2ab1441f5061079ce9240fb22f (diff) | |
download | mpv-969757baa0af99d905a9b8c99f0c92efa4e0fb33.tar.bz2 mpv-969757baa0af99d905a9b8c99f0c92efa4e0fb33.tar.xz |
player: always use demux_chapter
Instead of defining a separate data structure in the core.
For some odd reason, demux_chapter exported the chapter time in
nano-seconds. Change that to the usual timestamps (rename the field
to make any code relying on this to fail compilation), and also remove
the unused chapter end time.
Diffstat (limited to 'player/timeline/tl_cue.c')
-rw-r--r-- | player/timeline/tl_cue.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/player/timeline/tl_cue.c b/player/timeline/tl_cue.c index a4f23c45cf..8b8afeae17 100644 --- a/player/timeline/tl_cue.c +++ b/player/timeline/tl_cue.c @@ -361,8 +361,8 @@ void build_cue_timeline(struct MPContext *mpctx) struct timeline_part *timeline = talloc_array_ptrtype(NULL, timeline, track_count + 1); - struct chapter *chapters = talloc_array_ptrtype(NULL, chapters, - track_count); + struct demux_chapter *chapters = talloc_array_ptrtype(NULL, chapters, + track_count); double starttime = 0; for (int i = 0; i < track_count; i++) { struct demuxer *source = mpctx->sources[1 + tracks[i].source]; @@ -387,8 +387,8 @@ void build_cue_timeline(struct MPContext *mpctx) .source_start = tracks[i].start, .source = source, }; - chapters[i] = (struct chapter) { - .start = timeline[i].start, + chapters[i] = (struct demux_chapter) { + .pts = timeline[i].start, // might want to include other metadata here .name = bstrdup0(chapters, tracks[i].title), }; |