resindvd: guard against not finding some data on a DVD

May possibly help with a particular DVD.

https://bugzilla.gnome.org/show_bug.cgi?id=673118
This commit is contained in:
Vincent Penquerc'h 2012-06-07 15:06:34 +01:00
parent aa0b2c7f8a
commit 54f7ab5cf6

View file

@ -474,6 +474,12 @@ read_vts_info (resinDvdSrc * src)
GST_ERROR ("Can't open VMG ifo"); GST_ERROR ("Can't open VMG ifo");
return FALSE; return FALSE;
} }
if (!src->vmg_file->vts_atrt) {
GST_INFO ("No vts_atrt - odd, but apparently OK");
g_array_set_size (src->vts_attrs, 0);
src->vts_attrs = NULL;
return TRUE;
}
n_vts = src->vmg_file->vts_atrt->nr_of_vtss; n_vts = src->vmg_file->vts_atrt->nr_of_vtss;
memcpy (&src->vmgm_attr, src->vmg_file->vmgi_mat, sizeof (vmgi_mat_t)); memcpy (&src->vmgm_attr, src->vmg_file->vmgi_mat, sizeof (vmgi_mat_t));
@ -1915,7 +1921,7 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src)
gboolean have_audio; gboolean have_audio;
gboolean have_subp; gboolean have_subp;
if (src->vts_n == 0) { if (src->vts_n == 0 || src->vts_attrs == NULL) {
/* VMGM info */ /* VMGM info */
vts_attr = NULL; vts_attr = NULL;
v_attr = &src->vmgm_attr.vmgm_video_attr; v_attr = &src->vmgm_attr.vmgm_video_attr;