[vlc-commits] livehttp: gather blocks so we can write more at the time

Ilkka Ollakka git at videolan.org
Sun Sep 21 15:51:06 CEST 2014


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Sep 20 18:24:40 2014 +0100| [609a5fe2b4cdd2cca8bdd99e917ddd4d377bc6e6] | committer: Ilkka Ollakka

livehttp: gather blocks so we can write more at the time

Otherwise we would loop and write() ts-packet at a time.

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

 modules/access_output/livehttp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/access_output/livehttp.c b/modules/access_output/livehttp.c
index 5cce2d5..e59f3b4 100644
--- a/modules/access_output/livehttp.c
+++ b/modules/access_output/livehttp.c
@@ -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;



More information about the vlc-commits mailing list