[vlc-devel] [PATCH 01/48] hls: Fix vod

Jean-Paul Saman jpsaman at videolan.org
Tue Jan 10 11:04:14 CET 2012


On Mon, Jan 9, 2012 at 4:16 PM, Hugo Beauzée-Luyssen <beauze.h at gmail.com> wrote:
> From: Luc Saillard <luc.saillard at sfr.com>
>
> Don't stop when playing a vod file without bandwidth information
>

Patch looks good.

Kind regards,
Jean-Paul Saman

> When a playlist doesn't contains any bandwidth stream or information,
> initialize stream->bandwidth to 0 (it's a unsigned number). So test will
> not
> fail when calculating if we have the time to download it.
>  >> uint64_t size = (segment->duration * hls->bandwidth);
>  >> int estimated = (int)(size / s->p_sys->bandwidth);
>  >> if (estimated > segment->duration)
> ---
>  modules/stream_filter/httplive.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
> index fb7ca70..a698c05 100644
> --- a/modules/stream_filter/httplive.c
> +++ b/modules/stream_filter/httplive.c
> @@ -1637,7 +1637,7 @@ static int Open(vlc_object_t *p_this)
>     vlc_UrlParse(&p_sys->m3u8, psz_uri, 0);
>     free(psz_uri);
>
> -    p_sys->bandwidth = -1;
> +    p_sys->bandwidth = 0;
>     p_sys->b_live = true;
>     p_sys->b_meta = false;
>     p_sys->b_error = false;
> --
> 1.7.8.3
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list