[vlc-commits] hls: Fix vod

Luc Saillard git at videolan.org
Mon Jan 23 21:52:49 CET 2012


vlc | branch: master | Luc Saillard <luc.saillard at sfr.com> | Mon Dec 12 10:56:38 2011 +0100| [9ffcb9c5cfcb3145df309874eafbaf573581b32a] | committer: 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: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9ffcb9c5cfcb3145df309874eafbaf573581b32a
---

 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 c47cf69..9ef659a 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -1957,7 +1957,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;



More information about the vlc-commits mailing list