[vlc-commits] livehttp: simplify checks
Ilkka Ollakka
git at videolan.org
Sat Nov 29 14:43:59 CET 2014
vlc/vlc-2.2 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Jul 6 11:22:08 2014 +0300| [cbba895c59b80df6a95db67b3ff2abfabde2169f] | committer: Ilkka Ollakka
livehttp: simplify checks
(cherry picked from commit ce474970e88b2af6e0237bfe08106da19427bce0)
Signed-off-by: Ilkka Ollakka <ileoo at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=cbba895c59b80df6a95db67b3ff2abfabde2169f
---
modules/access_output/livehttp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/access_output/livehttp.c b/modules/access_output/livehttp.c
index a4e4eba..b34369b 100644
--- a/modules/access_output/livehttp.c
+++ b/modules/access_output/livehttp.c
@@ -904,8 +904,8 @@ static int CheckSegmentChange( sout_access_out_t *p_access, block_t *p_buffer )
block_t *output = p_sys->block_buffer;
if( p_sys->i_handle > 0 &&
- ( ( p_buffer->i_dts - p_sys->i_opendts +
- ( p_buffer->i_length * CLOCK_FREQ / INT64_C(1000000) )
+ (( p_buffer->i_dts - p_sys->i_opendts +
+ p_buffer->i_length
) >= p_sys->i_seglenm ) )
{
closeCurrentSegment( p_access, p_sys, false );
@@ -973,8 +973,8 @@ static ssize_t writeSegment( sout_access_out_t *p_access )
}
p_sys->f_seglen =
- (float)(output->i_length / INT64_C(1000000) ) +
- (float)(output->i_dts - p_sys->i_opendts) / CLOCK_FREQ;
+ (float)(output->i_length + p_sys->i_dts_offset +
+ output->i_dts - p_sys->i_opendts) / CLOCK_FREQ;
if ( (size_t)val >= output->i_buffer )
{
More information about the vlc-commits
mailing list