From 038f77e2728f9f78f74b0fb9f86d8d2b19af2b04 Mon Sep 17 00:00:00 2001 From: nicodvb Date: Thu, 29 Nov 2007 23:25:14 +0000 Subject: -identify also shows the duration(s) of the title(s) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25205 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_dvdnav.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index 5c851c178a..e2ae4d7053 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -350,10 +350,12 @@ static int control(stream_t *stream, int cmd, void* arg) { static void identify_chapters(dvdnav_t *nav, uint32_t title) { - uint64_t *parts=NULL; + uint64_t *parts=NULL, duration=0; uint32_t n, i, t; - n = dvdnav_describe_title_chapters(nav, title, &parts); + n = dvdnav_describe_title_chapters(nav, title, &parts, &duration); if(parts) { + t = duration / 90; + mp_msg(MSGT_IDENTIFY, MSGL_V, "ID_DVD_TITLE_%d_LENGTH=%d.%03d\n", title, t / 1000, t % 1000); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "TITLE %u, CHAPTERS: ", title); for(i=0; i