[vlc-devel] [PATCH] VLC unable to play HLS live stream

Ilkka Ollakka ileoo at videolan.org
Wed Aug 14 14:35:34 CEST 2013


Hi,

What this change fixes? segment->size is used mostly to calculate bw and
in such I think it shouldn't be shortened by padding as padding needs to
be transferred also.

-- 
Ilkka Ollakka
I think, therefore I am... I think.
-------------- next part --------------
From 437e3acdd0b93ad5a6cfd307954babc4e9cb11fd Mon Sep 17 00:00:00 2001
From: Avishay Spitzer <savishay at gmail.com>
Date: Wed, 14 Aug 2013 04:06:00 -0400
Subject: [PATCH 2/3] Subtract padding from segment size in case of encrpted
 HLS stream.

---
 modules/stream_filter/httplive.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index dca2a54..339b75a 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -1302,6 +1302,10 @@ static int hls_DecodeSegmentData(stream_t *s, hls_stream_t *hls, segment_t *segm
     /* not all the data is readable because of padding */
     segment->data->i_buffer -= pad;
 
+    // Padding should be subrtacted otherwise the segment's size is bigger than the actual size in
+    // case of encryption
+    segment->size -= pad;
+
     return VLC_SUCCESS;
 }
 
-- 
1.7.9.5

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20130814/b78e3190/attachment.sig>


More information about the vlc-devel mailing list