[vlc-devel] [PATCH 19/48] hls: Avoid crash at start

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


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

---
 modules/stream_filter/httplive.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index 606f2f4..ff8bf33 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -1978,6 +1978,8 @@ static int Open(vlc_object_t *p_this)
     hls_ChooseDefaultStream(p_sys);
     int current = p_sys->playback.stream = p_sys->b_live ? 3 : 0;
     p_sys->playback.segment = p_sys->download.segment = ChooseSegment(s, current);
+    if (p_sys->b_meta && !hls_Get(p_sys->hls_stream, current))
+        goto fail;
 
     /* manage encryption key if needed */
     hls_ManageSegmentKeys(s, hls_Get(p_sys->hls_stream, current));
-- 
1.7.8.3




More information about the vlc-devel mailing list