summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvdnav.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_dvdnav.c')
-rw-r--r--stream/stream_dvdnav.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
index 6f4c70ab49..c8e6c2fa47 100644
--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -213,8 +213,15 @@ static int fill_buffer(stream_t *s, char *but, int len)
case DVDNAV_STOP: return len;
case DVDNAV_BLOCK_OK: return len;
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;
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;
}
}
@@ -287,6 +294,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
}
if(p->track > 0) {
+ dvdnav_priv->title = p->track;
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));
return STREAM_UNSUPORTED;