mirror of
https://github.com/mpv-player/mpv
synced 2024-11-14 22:48:35 +01:00
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} git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18092 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f81bab628d
commit
3a1d78bc7a
@ -432,7 +432,7 @@ static int dvdtimetomsec(dvd_time_t *dt)
|
||||
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
|
||||
@ -443,14 +443,11 @@ static int mp_get_titleset_length(ifo_handle_t *vts_file, tt_srpt_t *tt_srpt, in
|
||||
return 0;
|
||||
|
||||
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 @@ static int mp_describe_titleset(dvd_reader_t *dvd, tt_srpt_t *tt_srpt, int vts_n
|
||||
{
|
||||
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 @@ static int control(stream_t *stream,int cmd,void* arg)
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user