aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpdemux
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-15 11:47:33 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-15 11:47:33 +0000
commit68371d29850a72f82d97b7d0c2c0d76273d5bb16 (patch)
treeb0967ea5556c7e2f4b5b7cb99cbe9c4305a09876 /libmpdemux
parenta66210ff32b0127256d27043cff31a415b39bcd5 (diff)
ugly hack to make it work again with external libdvdread
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16771 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/stream_dvd.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libmpdemux/stream_dvd.c b/libmpdemux/stream_dvd.c
index a625a14328..8987f76464 100644
--- a/libmpdemux/stream_dvd.c
+++ b/libmpdemux/stream_dvd.c
@@ -625,7 +625,11 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
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 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
}
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 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
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 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
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) {