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

Hugo Beauzée-Luyssen beauze.h at gmail.com
Mon Jan 9 16:16:10 CET 2012


From: Luc Saillard <luc.saillard at sfr.com>

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)
---
 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




More information about the vlc-devel mailing list