# HG changeset patch # User ib # Date 1325336128 0 # Node ID b2d661762e9099f1dabe0295f728f113ee8751c5 # Parent 9ee95c78e85fed9f96bb1f89028e25a4d6cf86e0 Retrieve DVD's titles, chapters and angles by stream control commands. Don't access the private vmg_file member structure. diff -r 9ee95c78e85f -r b2d661762e90 gui/interface.c --- a/gui/interface.c Sat Dec 31 12:45:46 2011 +0000 +++ b/gui/interface.c Sat Dec 31 12:55:28 2011 +0000 @@ -638,10 +638,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); dvd = stream->priv; - guiInfo.Tracks = dvd->vmg_file->tt_srpt->nr_of_srpts; - guiInfo.Chapters = dvd->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts; - guiInfo.Angles = dvd->vmg_file->tt_srpt->title[dvd_title].nr_of_angles; guiInfo.AudioStreams = dvd->nr_of_channels; memcpy(guiInfo.AudioStream, dvd->audio_streams, sizeof(dvd->audio_streams)); guiInfo.Subtitles = dvd->nr_of_subtitles;