mirror of
https://github.com/mpv-player/mpv
synced 2025-01-09 01:36:25 +01:00
don't play any other title other than N when N is specified (with dvdnav://N)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20421 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8ac3fbc190
commit
2609080340
@ -213,8 +213,15 @@ static int fill_buffer(stream_t *s, char *but, int len)
|
|||||||
case DVDNAV_STOP: return len;
|
case DVDNAV_STOP: return len;
|
||||||
case DVDNAV_BLOCK_OK: return len;
|
case DVDNAV_BLOCK_OK: return len;
|
||||||
case DVDNAV_VTS_CHANGE: {
|
case DVDNAV_VTS_CHANGE: {
|
||||||
|
int tit = 0, part = 0;
|
||||||
|
dvdnav_vts_change_event_t *evt = (dvdnav_vts_change_event_t*)but;
|
||||||
s->end_pos = 0;
|
s->end_pos = 0;
|
||||||
update_title_len(s);
|
update_title_len(s);
|
||||||
|
if(dvdnav_current_title_info(dvdnav_priv->dvdnav, &tit, &part) == DVDNAV_STATUS_OK) {
|
||||||
|
mp_msg(MSGT_CPLAYER,MSGL_V, "\r\nDVDNAV, NEW VTS event: VTS %d, title %d\r\n", evt->new_vtsN, tit);
|
||||||
|
if(dvdnav_priv->title > 0 && tit != dvdnav_priv->title)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -287,6 +294,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(p->track > 0) {
|
if(p->track > 0) {
|
||||||
|
dvdnav_priv->title = p->track;
|
||||||
if(dvdnav_title_play(dvdnav_priv->dvdnav, p->track) != DVDNAV_STATUS_OK) {
|
if(dvdnav_title_play(dvdnav_priv->dvdnav, p->track) != DVDNAV_STATUS_OK) {
|
||||||
mp_msg(MSGT_OPEN,MSGL_FATAL,"dvdnav_stream, couldn't select title %d, error '%s'\n", p->track, dvdnav_err_to_string(dvdnav_priv->dvdnav));
|
mp_msg(MSGT_OPEN,MSGL_FATAL,"dvdnav_stream, couldn't select title %d, error '%s'\n", p->track, dvdnav_err_to_string(dvdnav_priv->dvdnav));
|
||||||
return STREAM_UNSUPORTED;
|
return STREAM_UNSUPORTED;
|
||||||
|
@ -20,6 +20,7 @@ typedef struct {
|
|||||||
int prelen; /* length of prefill buffer */
|
int prelen; /* length of prefill buffer */
|
||||||
unsigned int duration; /* in milliseconds */
|
unsigned int duration; /* in milliseconds */
|
||||||
int mousex, mousey;
|
int mousex, mousey;
|
||||||
|
int title;
|
||||||
} dvdnav_priv_t;
|
} dvdnav_priv_t;
|
||||||
|
|
||||||
extern int dvd_nav_still;
|
extern int dvd_nav_still;
|
||||||
|
Loading…
Reference in New Issue
Block a user