summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
authorulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-17 03:42:54 +0000
committerulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-17 03:42:54 +0000
commit6b51b17c51e8df204177d89f2c643d87d864b6cc (patch)
tree0bdad4fd72df2d7217d48a181c35deb1e20824a6 /command.c
parent1dc9f8ea08568d145c7f9ace52a13a9e115ca8bc (diff)
downloadmpv-6b51b17c51e8df204177d89f2c643d87d864b6cc.tar.bz2
mpv-6b51b17c51e8df204177d89f2c643d87d864b6cc.tar.xz
Modified for using chapter property for $(NAME:TEXT) or ?(NAME:TEXT).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25430 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'command.c')
-rw-r--r--command.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/command.c b/command.c
index 68b30b9503..9710ca87f3 100644
--- a/command.c
+++ b/command.c
@@ -381,9 +381,12 @@ static int mp_property_chapter(m_option_t *prop, int action, void *arg,
switch (action) {
case M_PROPERTY_GET:
+ chapter = demuxer_get_current_chapter(mpctx->demuxer);
+ if (chapter < 0)
+ return M_PROPERTY_UNAVAILABLE;
if (!arg)
return M_PROPERTY_ERROR;
- *(int *) arg = demuxer_get_current_chapter(mpctx->demuxer);
+ *(int *) arg = chapter;
return M_PROPERTY_OK;
case M_PROPERTY_PRINT: {
if (!arg)