vlc | branch: master | Steve Lhomme <rob...@ycbcr.xyz> | Wed Sep 19 10:32:26 
2018 +0200| [7e8b08776343ecbac7d0a64b0900f3ab3e597e81] | committer: Steve Lhomme

access_output:livehttp: write output_last_length only once

easier to read

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7e8b08776343ecbac7d0a64b0900f3ab3e597e81
---

 modules/access_output/livehttp.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/access_output/livehttp.c b/modules/access_output/livehttp.c
index 17f080e35a..221220818a 100644
--- a/modules/access_output/livehttp.c
+++ b/modules/access_output/livehttp.c
@@ -947,11 +947,13 @@ static ssize_t writeSegment( sout_access_out_t *p_access )
     msg_Dbg( p_access, "Writing all full segments" );
 
     block_t *output = p_sys->full_segments;
-    vlc_tick_t output_last_length = 0;
+    vlc_tick_t output_last_length;
     if( output )
         output_last_length = output->i_length;
-    if( *p_sys->full_segments_end )
+    else if( *p_sys->full_segments_end )
         output_last_length = (*p_sys->full_segments_end)->i_length;
+    else
+        output_last_length = 0;
     p_sys->full_segments = NULL;
     p_sys->full_segments_end = &p_sys->full_segments;
 

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to