diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-04-01 19:55:26 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-04-02 06:51:26 +0300 |
commit | f12c83b85b135c1cb9fb34e978eb0c8051450da8 (patch) | |
tree | 793b653cd5bda953f13cf02b1b14c72d9c0c7713 /command.c | |
parent | 997f636599a0a8eda56246b535aa9c920b24b67c (diff) | |
download | mpv-f12c83b85b135c1cb9fb34e978eb0c8051450da8.tar.bz2 mpv-f12c83b85b135c1cb9fb34e978eb0c8051450da8.tar.xz |
Change demuxer_seek_chapter() parameters
Remove the "num_chapters" and "mode" parameters that aren't needed by
any callers. Change "float *seek_pts" to "double *". Allocate the
string returned via "chapter_name" with talloc.
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -387,8 +387,6 @@ static int mp_property_chapter(m_option_t *prop, int action, void *arg, { struct MPOpts *opts = &mpctx->opts; int chapter = -1; - float next_pts = 0; - int chapter_num; int step_all; char *chapter_name = NULL; @@ -431,10 +429,12 @@ static int mp_property_chapter(m_option_t *prop, int action, void *arg, default: return M_PROPERTY_NOT_IMPLEMENTED; } + + double next_pts = 0; + chapter = demuxer_seek_chapter(mpctx->demuxer, chapter, &next_pts, + &chapter_name); mpctx->rel_seek_secs = 0; mpctx->abs_seek_pos = 0; - chapter = demuxer_seek_chapter(mpctx->demuxer, chapter, 1, - &next_pts, &chapter_num, &chapter_name); if (chapter >= 0) { if (next_pts > -1.0) { mpctx->abs_seek_pos = SEEK_ABSOLUTE; @@ -450,7 +450,7 @@ static int mp_property_chapter(m_option_t *prop, int action, void *arg, set_osd_msg(OSD_MSG_TEXT, 1, opts->osd_duration, MSGTR_OSDChapter, 0, MSGTR_Unknown); if (chapter_name) - free(chapter_name); + talloc_free(chapter_name); return M_PROPERTY_OK; } |