mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
16596d025a
commit
9e4014d876
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue