Commit 9ffcb9c5 authored by Luc Saillard's avatar Luc Saillard Committed by Jean-Baptiste Kempf

hls: Fix vod

Don't stop when playing a vod file without bandwidth information

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)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 1a89d92f
...@@ -1957,7 +1957,7 @@ static int Open(vlc_object_t *p_this) ...@@ -1957,7 +1957,7 @@ static int Open(vlc_object_t *p_this)
vlc_UrlParse(&p_sys->m3u8, psz_uri, 0); vlc_UrlParse(&p_sys->m3u8, psz_uri, 0);
free(psz_uri); free(psz_uri);
p_sys->bandwidth = -1; p_sys->bandwidth = 0;
p_sys->b_live = true; p_sys->b_live = true;
p_sys->b_meta = false; p_sys->b_meta = false;
p_sys->b_error = false; p_sys->b_error = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment