changeset 34451:19277315b8c6

Retrieve DVD's titles, chapters and angles by stream control commands. Don't access the private vmg_file member structure. (This is missing in r34477.)
author ib
date Tue, 10 Jan 2012 12:04:50 +0000
parents 74622554a386
children c3e63d8b6cf3
files gui/win32/interface.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gui/win32/interface.c	Tue Jan 10 11:51:30 2012 +0000
+++ b/gui/win32/interface.c	Tue Jan 10 12:04:50 2012 +0000
@@ -667,10 +667,13 @@
             {
 #ifdef CONFIG_DVDREAD
                 case STREAMTYPE_DVD:
+                    guiInfo.Tracks = 0;
+                    stream_control(stream, STREAM_CTRL_GET_NUM_TITLES, &guiInfo.Tracks);
+                    guiInfo.Chapters = 0;
+                    stream_control(stream, STREAM_CTRL_GET_NUM_CHAPTERS, &guiInfo.Chapters);
+                    guiInfo.Angles = 0;
+                    stream_control(stream, STREAM_CTRL_GET_NUM_ANGLES, &guiInfo.Angles);
                     dvdp = stream->priv;
-                    guiInfo.Tracks = dvdp->vmg_file->tt_srpt->nr_of_srpts;
-                    guiInfo.Chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts;
-                    guiInfo.Angles = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles;
                     guiInfo.AudioStreams = dvdp->nr_of_channels;
                     memcpy(guiInfo.AudioStream, dvdp->audio_streams, sizeof(dvdp->audio_streams));
                     guiInfo.Subtitles = dvdp->nr_of_subtitles;