[vlc-devel] [PATCH] bluray: fix division by zero
Jean-Baptiste Kempf
jb at videolan.org
Sat Feb 8 15:40:00 CET 2014
Applied, thanks.
On 08 Feb, Petri Hintukainen wrote :
> ---
> modules/access/bluray.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/modules/access/bluray.c b/modules/access/bluray.c
> index 74563e7..4e0e816 100644
> --- a/modules/access/bluray.c
> +++ b/modules/access/bluray.c
> @@ -1331,8 +1331,8 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
> case DEMUX_GET_POSITION:
> {
> double *pf_position = (double*)va_arg(args, double *);
> - *pf_position = p_demux->info.i_title < (int)p_sys->i_title ?
> - (double)FROM_TICKS(bd_tell_time(p_sys->bluray))/CUR_LENGTH : 0.0;
> + *pf_position = p_demux->info.i_title < (int)p_sys->i_title && CUR_LENGTH > 0 ?
> + (double)FROM_TICKS(bd_tell_time(p_sys->bluray))/CUR_LENGTH : 0.0;
> return VLC_SUCCESS;
> }
> case DEMUX_SET_POSITION:
> --
> 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