]> git.sesse.net Git - vlc/commitdiff
livehttp: gather blocks so we can write more at the time
authorIlkka Ollakka <ileoo@videolan.org>
Sat, 20 Sep 2014 17:24:40 +0000 (18:24 +0100)
committerIlkka Ollakka <ileoo@videolan.org>
Sun, 21 Sep 2014 13:40:09 +0000 (14:40 +0100)
Otherwise we would loop and write() ts-packet at a time.

modules/access_output/livehttp.c

index 5cce2d5d1ebea9e316c781b0fbe82c3147634cd9..e59f3b42e8bc2fa118b2a1eff6035cff899c52a5 100644 (file)
@@ -944,7 +944,7 @@ static int CheckSegmentChange( sout_access_out_t *p_access, block_t *p_buffer )
 static ssize_t writeSegment( sout_access_out_t *p_access )
 {
     sout_access_out_sys_t *p_sys = p_access->p_sys;
-    block_t *output = p_sys->block_buffer;
+    block_t *output = p_sys->block_buffer ? block_ChainGather( p_sys->block_buffer ) : NULL;
     p_sys->block_buffer = NULL;
     ssize_t i_write=0;
     bool crypted = false;