resindvd: Ensure we send a title tag in the first play section.

This commit is contained in:
Jan Schmidt 2009-05-08 16:27:31 +01:00
parent f2f79cd410
commit c0854113a1

View file

@ -767,7 +767,14 @@ update_title_info (resinDvdSrc * src)
}
if (dvdnav_current_title_info (src->dvdnav, &title_n,
&part_n) == DVDNAV_STATUS_OK) {
&part_n) != DVDNAV_STATUS_OK) {
if (!src->in_menu)
return; /* Can't update now */
/* Must be in the first play sequence */
title_n = -1;
part_n = 0;
}
if (title_n != src->title_n || part_n != src->part_n ||
src->n_angles != n_angles || src->cur_angle != cur_agl) {
gchar *title_str = NULL;
@ -780,7 +787,7 @@ update_title_info (resinDvdSrc * src)
if (title_n == 0) {
/* In a menu */
title_str = g_strdup ("DVD Menu");
} else {
} else if (title_n > 0) {
/* In a title */
if (n_angles > 1) {
title_str = g_strdup_printf ("Title %i, Chapter %i, Angle %i of %i",
@ -809,7 +816,6 @@ update_title_info (resinDvdSrc * src)
gst_element_found_tags (GST_ELEMENT_CAST (src), tags);
}
}
}
}
static GstFlowReturn
@ -911,7 +917,6 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock)
src->next_is_nav_block = FALSE;
src->next_nav_ts = GST_CLOCK_TIME_NONE;
}
break;
}
case DVDNAV_STOP: