]> git.sesse.net Git - vlc/blobdiff - modules/access_output/http.c
HTTP and UDP access outputs return byte count
[vlc] / modules / access_output / http.c
index 66099bb3569583bbfd2c551e9709a0673be12ed8..6de43253c6a55b59a8752146bd4dfecb83f02fb4 100644 (file)
@@ -374,6 +374,7 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer )
 {
     sout_access_out_sys_t *p_sys = p_access->p_sys;
     int i_err = 0;
+    int i_len = 0;
 
     while( p_buffer )
     {
@@ -409,6 +410,7 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer )
                                 p_sys->i_header_size );
         }
 
+        i_len += p_buffer->i_buffer;
         /* send data */
         i_err = httpd_StreamSend( p_sys->p_httpd_stream, p_buffer->p_buffer,
                                   p_buffer->i_buffer );
@@ -428,7 +430,7 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer )
         block_ChainRelease( p_buffer );
     }
 
-    return( i_err < 0 ? VLC_EGENERIC : VLC_SUCCESS );
+    return( i_err < 0 ? VLC_EGENERIC : i_len );
 }
 
 /*****************************************************************************