[vlc-commits] livehttp: use playlist max duration instead segment max duration to calculate if we can remove segment in live case
Ilkka Ollakka
git at videolan.org
Wed Sep 4 13:13:48 CEST 2013
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Sep 4 13:52:56 2013 +0300| [834987a1fd817b00f88ef665e033264e2ea78e11] | committer: Ilkka Ollakka
livehttp: use playlist max duration instead segment max duration to calculate if we can remove segment in live case
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=834987a1fd817b00f88ef665e033264e2ea78e11
---
modules/access_output/livehttp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/access_output/livehttp.c b/modules/access_output/livehttp.c
index 9149a94..9eddfc1 100644
--- a/modules/access_output/livehttp.c
+++ b/modules/access_output/livehttp.c
@@ -513,13 +513,13 @@ static uint32_t segmentAmountNeeded( sout_access_out_sys_t *p_sys )
/************************************************************************
* isFirstItemRemovable: Check for draft 11 section 6.2.2
* check that the first item has been around outside playlist
- * segment->f_seglength + p_sys->i_seglen before it is removed.
+ * segment->f_seglength + (p_sys->i_numsegs * p_sys->i_seglen) before it is removed.
************************************************************************/
static bool isFirstItemRemovable( sout_access_out_sys_t *p_sys, uint32_t i_firstseg, uint32_t i_index_offset )
{
float duration = .0f;
- /* Check that segment has been out of playlist for seglenght + p_sys->i_seglen amount
+ /* Check that segment has been out of playlist for seglenght + (p_sys->i_numsegs * p_sys->i_seglen) amount
* We check this by calculating duration of the items that replaced first item in playlist
*/
for(int index=0; index < i_index_offset; index++ )
@@ -529,7 +529,7 @@ static bool isFirstItemRemovable( sout_access_out_sys_t *p_sys, uint32_t i_first
}
output_segment_t *first = vlc_array_item_at_index( p_sys->segments_t, 0 );
- return duration >= (first->f_seglength + (float)p_sys->i_seglen);
+ return duration >= (first->f_seglength + (float)(p_sys->i_numsegs * p_sys->i_seglen));
}
/************************************************************************
More information about the vlc-commits
mailing list