diff options
author | wm4 <wm4@nowhere> | 2013-09-07 19:59:39 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-09-07 20:34:49 +0200 |
commit | d77a9244346adadd283a48ee55adebd5f8e37478 (patch) | |
tree | 55b19f20dac247aa908ebbb10f3710c6cd4d6824 /mpvcore/command.c | |
parent | 494d40858351bbe4a83c98758440621d3fcdc5c9 (diff) | |
download | mpv-d77a9244346adadd283a48ee55adebd5f8e37478.tar.bz2 mpv-d77a9244346adadd283a48ee55adebd5f8e37478.tar.xz |
command: remove some unneeded code
chapter_display_name() always returns something.
The "chapter < -1" check is not needed, because this is done at the
start of the function.
Diffstat (limited to 'mpvcore/command.c')
-rw-r--r-- | mpvcore/command.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/mpvcore/command.c b/mpvcore/command.c index 3834f4ed30..fa2bbf963c 100644 --- a/mpvcore/command.c +++ b/mpvcore/command.c @@ -389,10 +389,7 @@ static int mp_property_chapter(m_option_t *prop, int action, void *arg, *(int *) arg = chapter; return M_PROPERTY_OK; case M_PROPERTY_PRINT: { - char *chapter_name = chapter_display_name(mpctx, chapter); - if (!chapter_name) - return M_PROPERTY_UNAVAILABLE; - *(char **) arg = chapter_name; + *(char **) arg = chapter_display_name(mpctx, chapter); return M_PROPERTY_OK; } case M_PROPERTY_SWITCH: @@ -403,8 +400,6 @@ static int mp_property_chapter(m_option_t *prop, int action, void *arg, step_all = ROUND(sarg->inc); // Check threshold for relative backward seeks if (mpctx->opts->chapter_seek_threshold >= 0 && step_all < 0) { - if (chapter < -1) - return M_PROPERTY_UNAVAILABLE; double current_chapter_start = chapter_start_time(mpctx, chapter); // If we are far enough into a chapter, seek back to the |