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
This commit is contained in:
ulion 2007-12-17 03:42:54 +00:00
parent 1dc9f8ea08
commit 6b51b17c51
1 changed files with 4 additions and 1 deletions

View File

@ -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)