0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00

-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
This commit is contained in:
nicodvb 2007-11-29 23:25:14 +00:00
parent 36bcaa934d
commit 038f77e272

View File

@ -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<n; i++) {
t = parts[i] / 90000;