mirror of
https://github.com/mpv-player/mpv
synced 2025-01-31 12:11:52 +00:00
implemented STREAM_CTRL_GET_NUM_CHAPTERS
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19482 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
28a6ef4591
commit
66e04345be
@ -514,6 +514,12 @@ static int control(stream_t *stream,int cmd,void* arg)
|
||||
*((unsigned int *)arg) = mp_get_titleset_length(d->vts_file, d->tt_srpt, d->cur_title-1);
|
||||
return 1;
|
||||
}
|
||||
case STREAM_CTRL_GET_NUM_CHAPTERS:
|
||||
{
|
||||
if(! d->cur_pgc->nr_of_programs) return STREAM_UNSUPORTED;
|
||||
*((unsigned int *)arg) = d->cur_pgc->nr_of_programs;
|
||||
return 1;
|
||||
}
|
||||
case STREAM_CTRL_SEEK_TO_CHAPTER:
|
||||
{
|
||||
int r = seek_to_chapter(stream, d->vts_file, d->tt_srpt, d->cur_title-1, *((unsigned int *)arg));
|
||||
|
Loading…
Reference in New Issue
Block a user