Commit 32e19b17 authored by Ilkka Ollakka's avatar Ilkka Ollakka

livehttp: take block length in account when checking segment length

parent b82c5233
......@@ -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 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment