[vlc-commits] hls: Fix vod

Luc Saillard git at videolan.org
Tue Jan 24 19:31:55 CET 2012


vlc/vlc-1.2 | branch: master | Luc Saillard <luc.saillard at sfr.com> | Mon Dec 12 10:56:38 2011 +0100| [cef11dd919019de962fe3b2847dc5e3bfc73d320] | 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>
(cherry picked from commit 9ffcb9c5cfcb3145df309874eafbaf573581b32a)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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