ext/dvdread/dvdreadsrc.c: Error out properly if this is an interactive DVD (fixes #345694).

Original commit message from CVS:
* ext/dvdread/dvdreadsrc.c: (gst_dvd_read_src_goto_title):
Error out properly if this is an interactive DVD (fixes #345694).
This commit is contained in:
Tim-Philipp Müller 2006-08-07 16:25:45 +00:00
parent eb186eaaa0
commit 1c046c30d3
2 changed files with 19 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2006-08-07 Tim-Philipp Müller <tim at centricular dot net>
* ext/dvdread/dvdreadsrc.c: (gst_dvd_read_src_goto_title):
Error out properly if this is an interactive DVD (fixes #345694).
2006-08-07 Jan Schmidt <thaytan@mad.scientist.com>
* ext/a52dec/gsta52dec.c: (gst_a52dec_chain):

View file

@ -464,6 +464,12 @@ gst_dvd_read_src_goto_title (GstDvdReadSrc * src, gint title, gint angle)
src->ttn = src->tt_srpt->title[title].vts_ttn;
src->vts_ptt_srpt = src->vts_file->vts_ptt_srpt;
/* interactive title? */
if (src->num_chapters > 0 &&
src->vts_ptt_srpt->title[src->ttn - 1].ptt[0].pgn == 0) {
goto commands_only_pgc;
}
/* we've got enough info, time to open the title set data */
src->dvd_title = DVDOpenFile (src->dvd, title_set_nr, DVD_READ_TITLE_VOBS);
if (src->dvd_title == NULL)
@ -579,6 +585,14 @@ title_open_failed:
("Can't open title VOBS (VTS_%02d_1.VOB)", title_set_nr));
return FALSE;
}
commands_only_pgc:
{
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
(_("Could not open DVD title %d. Interactive titles are not supported "
"by this element"), title_set_nr),
("Commands-only PGC, not supported, use dvdnavsrc"));
return FALSE;
}
}
/* FIXME: double-check this function, compare against original */