# HG changeset patch # User reimar # Date 1129376853 0 # Node ID a580febbb306935041daf2c1cdacb9d19be536fa # Parent fbc6a8f057309a383e8a023a1e9809ec6da7e7f8 ugly hack to make it work again with external libdvdread diff -r fbc6a8f05730 -r a580febbb306 libmpdemux/stream_dvd.c --- a/libmpdemux/stream_dvd.c Sat Oct 15 10:46:24 2005 +0000 +++ b/libmpdemux/stream_dvd.c Sat Oct 15 11:47:33 2005 +0000 @@ -625,7 +625,11 @@ if(vts_file->vts_pgcit) { int i; for(i=0;i<8;i++) +#ifdef USE_MPDVDKIT if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->audio_control[i].present) { +#else + if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->audio_control[i] & 0x8000) { +#endif audio_attr_t * audio = &vts_file->vtsi_mat->vts_audio_attr[i]; int language = 0; char tmp[] = "unknown"; @@ -638,7 +642,11 @@ } d->audio_streams[d->nr_of_channels].language=language; +#ifdef USE_MPDVDKIT d->audio_streams[d->nr_of_channels].id=vts_file->vts_pgcit->pgci_srp[ttn].pgc->audio_control[i].s_audio; +#else + d->audio_streams[d->nr_of_channels].id=vts_file->vts_pgcit->pgci_srp[ttn].pgc->audio_control[i] >> 8 & 7; +#endif switch(audio->audio_format) { case 0: // ac3 d->audio_streams[d->nr_of_channels].id+=FIRST_AC3_AID; @@ -687,7 +695,11 @@ d->nr_of_subtitles=0; for(i=0;i<32;i++) +#ifdef USE_MPDVDKIT if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i].present) { +#else + if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i] & 0x80000000) { +#endif subp_attr_t * subtitle = &vts_file->vtsi_mat->vts_subp_attr[i]; video_attr_t *video = &vts_file->vtsi_mat->vts_video_attr; int language = 0; @@ -703,9 +715,17 @@ d->subtitles[ d->nr_of_subtitles ].language=language; d->subtitles[ d->nr_of_subtitles ].id=d->nr_of_subtitles; if(video->display_aspect_ratio == 0) /* 4:3 */ +#ifdef USE_MPDVDKIT d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i].s_4p3; +#else + d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i] >> 24 & 31; +#endif else if(video->display_aspect_ratio == 3) /* 16:9 */ +#ifdef USE_MPDVDKIT d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i].s_lbox; +#else + d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i] >> 8 & 31; +#endif mp_msg(MSGT_OPEN,MSGL_V,"[open] subtitle ( sid ): %d language: %s\n", d->nr_of_subtitles, tmp); if(identify) {