diff searching.c @ 315:9abc06e356ff src

now dvdnav_describe_title_chapters() also returns the duration of the title
author nicodvb
date Thu, 29 Nov 2007 23:24:05 +0000
parents ba9c3555e92f
children 68736572c62c
line wrap: on
line diff
--- a/searching.c	Thu Nov 29 23:09:59 2007 +0000
+++ b/searching.c	Thu Nov 29 23:24:05 2007 +0000
@@ -551,7 +551,7 @@
   return DVDNAV_STATUS_OK;
 }
 
-uint32_t dvdnav_describe_title_chapters(dvdnav_t *this, int32_t title, uint64_t **times) {
+uint32_t dvdnav_describe_title_chapters(dvdnav_t *this, int32_t title, uint64_t **times, uint64_t *duration) {
   int32_t retval=0;
   uint16_t parts, i;
   title_info_t *ptitle = NULL;
@@ -562,6 +562,7 @@
   uint64_t length, *tmp=NULL;
 
   *times = NULL;
+  *duration = 0;
   pthread_mutex_lock(&this->vm_lock);
   if(!this->vm->vmgi) {
     printerr("Bad VM state or missing VTSI.");
@@ -613,6 +614,7 @@
       cellnr++;
     } while(cellnr < endcellnr);
   }
+  *duration = length;
   vm_ifo_close(ifo);
   retval = parts;
   *times = tmp;