[vlc-commits] livehttp: take block length in account when checking segment length
Ilkka Ollakka
git at videolan.org
Thu Feb 28 12:31:48 CET 2013
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Thu Feb 28 13:01:17 2013 +0200| [32e19b17f69249e4dcaf9cb3f3d8ad7591615fbd] | committer: Ilkka Ollakka
livehttp: take block length in account when checking segment length
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32e19b17f69249e4dcaf9cb3f3d8ad7591615fbd
---
modules/access_output/livehttp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/access_output/livehttp.c b/modules/access_output/livehttp.c
index d815dea..25db4a6 100644
--- a/modules/access_output/livehttp.c
+++ b/modules/access_output/livehttp.c
@@ -456,7 +456,10 @@ static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
p_sys->block_buffer = NULL;
- if( p_sys->i_handle > 0 && ( p_buffer->i_dts - p_sys->i_opendts ) >= p_sys->i_seglenm )
+ if( p_sys->i_handle > 0 &&
+ ( p_buffer->i_dts - p_sys->i_opendts +
+ p_buffer->i_length * CLOCK_FREQ / INT64_C(1000000)
+ ) >= p_sys->i_seglenm )
closeCurrentSegment( p_access, p_sys, false );
if ( p_sys->i_handle < 0 )
More information about the vlc-commits
mailing list