diff options
author | xylosper <darklin20@gmail.com> | 2014-03-15 16:21:51 +0900 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-03-15 18:42:07 +0100 |
commit | 9e4014d8767b3802563185f6a846dc356274d9b3 (patch) | |
tree | 585c38c50d66d24a5133e3381b1fe30d59817cf5 | |
parent | 16596d025a4b84c696dd300b80fe27024f262ab5 (diff) |
stream_dvdnav: implement STREAM_CTRL_GET_NUM_TITLES for dvdnav
This commit provides impelmentation of STREAM_CTRL_GET_NUM_TITLES
for dvdnav stream. Other streams for DVD or Blu-ray are already
provide STREAM_CTRL_GET_NUM_TITLES.
-rw-r--r-- | stream/stream_dvdnav.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index 2fa1fc53ae..8d1c58af08 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -522,6 +522,13 @@ static int control(stream_t *stream, int cmd, void *arg) } break; } + case STREAM_CTRL_GET_NUM_TITLES: { + int32_t num_titles = 0; + if (dvdnav_get_number_of_titles(dvdnav, &num_titles) != DVDNAV_STATUS_OK) + break; + *((unsigned int*)arg)= num_titles; + return STREAM_OK; + } case STREAM_CTRL_GET_CURRENT_TITLE: { if (dvdnav_current_title_info(dvdnav, &tit, &part) != DVDNAV_STATUS_OK) break; |