[vlc-devel] [PATCH 1/2] bluray: use bd_get_main_title()
Jean-Baptiste Kempf
jb at videolan.org
Thu Feb 13 12:59:45 CET 2014
Applied both. Thanks.
On 13 Feb, Petri Hintukainen wrote :
> ---
> modules/access/bluray.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/modules/access/bluray.c b/modules/access/bluray.c
> index bc4c8e9..ce1cc7b 100644
> --- a/modules/access/bluray.c
> +++ b/modules/access/bluray.c
> @@ -1136,13 +1136,19 @@ static void blurayUpdateTitleInfo(demux_t *p_demux, input_title_t *t, int i_titl
> static void blurayInitTitles(demux_t *p_demux, int menu_titles)
> {
> demux_sys_t *p_sys = p_demux->p_sys;
> +#if BLURAY_VERSION < BLURAY_VERSION_CODE(0,5,0)
> int64_t duration = 0;
> +#endif
>
> /* get and set the titles */
> unsigned i_title = menu_titles;
>
> - if (!p_sys->b_menu)
> + if (!p_sys->b_menu) {
> i_title = bd_get_titles(p_sys->bluray, TITLES_RELEVANT, 60);
> +#if BLURAY_VERSION >= BLURAY_VERSION_CODE(0,5,0)
> + p_sys->i_longest_title = bd_get_main_title(p_sys->bluray);
> +#endif
> + }
>
> for (unsigned int i = 0; i < i_title; i++) {
> input_title_t *t = vlc_input_title_New();
> @@ -1152,10 +1158,12 @@ static void blurayInitTitles(demux_t *p_demux, int menu_titles)
> if (!p_sys->b_menu) {
> blurayUpdateTitleInfo(p_demux, t, i, -1);
>
> +#if BLURAY_VERSION < BLURAY_VERSION_CODE(0,5,0)
> if (t->i_length > duration) {
> duration = t->i_length;
> p_sys->i_longest_title = i;
> }
> +#endif
> } else if (i == 0) {
> t->psz_name = strdup(_("Top Menu"));
> } else if (i == i_title - 1) {
> --
> 1.8.3.2
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list