[MPlayer-cvslog] CVS: main/libmpdemux stream_dvd.c,1.14,1.15

Reimar Döffinger CVS syncmail at mplayerhq.hu
Fri Apr 14 15:03:08 CEST 2006


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv25537

Modified Files:
	stream_dvd.c 
Log Message:
remove vts_no parameter from mp_get_titleset_length - it is not only useless,
it also breaks STREAM_CTRL_GET_TIME_LENGTH.
Patch by kiriuja {mplayer-patches at en-directo net}


Index: stream_dvd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stream_dvd.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- stream_dvd.c	12 Apr 2006 11:19:49 -0000	1.14
+++ stream_dvd.c	14 Apr 2006 13:03:05 -0000	1.15
@@ -432,7 +432,7 @@
   return msec;
 }
 
-static int mp_get_titleset_length(ifo_handle_t *vts_file, tt_srpt_t *tt_srpt, int vts_no, int title_no)
+static int mp_get_titleset_length(ifo_handle_t *vts_file, tt_srpt_t *tt_srpt, int title_no)
 {
     int vts_ttn;  ///< title number within video title set
     int pgc_no;   ///< program chain number
@@ -444,12 +444,9 @@
 
     if(vts_file->vtsi_mat && vts_file->vts_pgcit)
     {
-        if(tt_srpt->title[title_no].title_set_nr == vts_no)
-        {
             vts_ttn = tt_srpt->title[title_no].vts_ttn - 1;
             pgc_no = vts_file->vts_ptt_srpt->title[vts_ttn].ptt[0].pgcn - 1;
             msec = dvdtimetomsec(&vts_file->vts_pgcit->pgci_srp[pgc_no].pgc->playback_time);
-        }
     }
     return msec;
 }
@@ -474,7 +471,7 @@
     {
         if (tt_srpt->title[title_no].title_set_nr != vts_no)
             continue;
-        msec = mp_get_titleset_length(vts_file, tt_srpt, vts_no, title_no);
+        msec = mp_get_titleset_length(vts_file, tt_srpt, title_no);
         mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_DVD_TITLE_%d_LENGTH=%d.%03d\n", title_no + 1, msec / 1000, msec % 1000);
     }
     ifoClose(vts_file);
@@ -488,7 +485,7 @@
         case STREAM_CTRL_GET_TIME_LENGTH:
         {
             dvd_priv_t *d = stream->priv;
-            *((unsigned int *)arg) = mp_get_titleset_length(d->vts_file, d->tt_srpt, d->cur_title, d->cur_title-1);
+            *((unsigned int *)arg) = mp_get_titleset_length(d->vts_file, d->tt_srpt, d->cur_title-1);
             return 1;
         }
     }




More information about the MPlayer-cvslog mailing list