summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-02 17:20:04 +0100
committerwm4 <wm4@nowhere>2014-11-02 17:29:41 +0100
commit969757baa0af99d905a9b8c99f0c92efa4e0fb33 (patch)
tree2db51b2e3bc89dce550fc1c9fbf31c7471a41fce /player/command.c
parent1cebd16350229d2ab1441f5061079ce9240fb22f (diff)
downloadmpv-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/command.c')
-rw-r--r--player/command.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/player/command.c b/player/command.c
index dbe81bff15..2995f094a0 100644
--- a/player/command.c
+++ b/player/command.c
@@ -1081,12 +1081,13 @@ static int mp_property_chapter_metadata(void *ctx, struct m_property *prop,
int action, void *arg)
{
MPContext *mpctx = ctx;
- struct demuxer *demuxer = mpctx->master_demuxer;
int chapter = get_current_chapter(mpctx);
- if (!demuxer || chapter < 0 || chapter >= demuxer->num_chapters)
+ if (chapter < 0 || chapter >= mpctx->num_chapters)
+ return M_PROPERTY_UNAVAILABLE;
+ if (!mpctx->chapters[chapter].metadata)
return M_PROPERTY_UNAVAILABLE;
- return tag_property(action, arg, demuxer->chapters[chapter].metadata);
+ return tag_property(action, arg, mpctx->chapters[chapter].metadata);
}
static int mp_property_vf_metadata(void *ctx, struct m_property *prop,