diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-04-02 05:00:22 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-04-02 06:51:26 +0300 |
commit | 2d91b19956c7d444ba440078e1c2ecd23d207a87 (patch) | |
tree | 27e0cac3e0f6ab3286ab6ec221ab763605113734 /command.c | |
parent | f12c83b85b135c1cb9fb34e978eb0c8051450da8 (diff) | |
download | mpv-2d91b19956c7d444ba440078e1c2ecd23d207a87.tar.bz2 mpv-2d91b19956c7d444ba440078e1c2ecd23d207a87.tar.xz |
Support chapter seeking with ordered chapters
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -5,6 +5,7 @@ #include <stdbool.h> #include "config.h" +#include "talloc.h" #include "command.h" #include "input/input.h" #include "stream/stream.h" @@ -391,7 +392,7 @@ static int mp_property_chapter(m_option_t *prop, int action, void *arg, char *chapter_name = NULL; if (mpctx->demuxer) - chapter = demuxer_get_current_chapter(mpctx->demuxer); + chapter = get_current_chapter(mpctx); if (chapter < 0) return M_PROPERTY_UNAVAILABLE; @@ -404,7 +405,7 @@ static int mp_property_chapter(m_option_t *prop, int action, void *arg, case M_PROPERTY_PRINT: { if (!arg) return M_PROPERTY_ERROR; - chapter_name = demuxer_chapter_display_name(mpctx->demuxer, chapter); + chapter_name = chapter_display_name(mpctx, chapter); if (!chapter_name) return M_PROPERTY_UNAVAILABLE; *(char **) arg = chapter_name; @@ -431,8 +432,7 @@ static int mp_property_chapter(m_option_t *prop, int action, void *arg, } double next_pts = 0; - chapter = demuxer_seek_chapter(mpctx->demuxer, chapter, &next_pts, - &chapter_name); + chapter = seek_chapter(mpctx, chapter, &next_pts, &chapter_name); mpctx->rel_seek_secs = 0; mpctx->abs_seek_pos = 0; if (chapter >= 0) { |