diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index 2d1a15237c..4b4d2268cc 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -348,6 +348,22 @@ static int control(stream_t *stream, int cmd, void* arg) { return STREAM_UNSUPPORTED; } +static void identify_chapters(dvdnav_t *nav, uint32_t title) +{ + uint64_t *parts=NULL; + uint32_t n, i, t; + n = dvdnav_describe_title_chapters(nav, title, &parts); + if(parts) { + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "CHAPTERS: "); + for(i=0; itrack > 0) { + if(mp_msg_test(MSGT_IDENTIFY, MSGL_INFO)) + identify_chapters(priv->dvdnav, p->track); if(dvd_chapter > 0 && dvd_last_chapter > 0 && dvd_chapter > dvd_last_chapter) { mp_msg(MSGT_OPEN,MSGL_FATAL,"dvdnav_stream, invalid chapter range: %d > %d\n", dvd_chapter, dvd_last_chapter); return STREAM_UNSUPPORTED;