[vlc-devel] [PATCH 2/3] hls: Fix vod
Hugo Beauzée-Luyssen
beauze.h at gmail.com
Fri Jan 20 16:04:16 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 fda5b13..126b71f 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -1968,7 +1968,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.4
More information about the vlc-devel
mailing list