Bug#421695: Info received (Bug#421695: Acknowledgement (vlc: Corrupted output stream with vcodec=MJPG mux=mpjpeg))

Rob Sims debbugs-z at robsims.com
Wed May 2 22:41:53 UTC 2007


A properly formatted patch below:


--- vlc-0.8.6.a.debian/modules/mux/mpjpeg.c.orig	2007-05-01 17:54:16.000000000 -0600
+++ vlc-0.8.6.a.debian/modules/mux/mpjpeg.c	2007-05-01 21:41:03.000000000 -0600
@@ -191,9 +191,9 @@
         char *psz_separator = var_CreateGetString( p_mux,
                                              SOUT_CFG_PREFIX "separator" );
         char *psz_separator_block = (char *)malloc( strlen( psz_separator ) +
-                                              2 + strlen( CONTENT_TYPE ) );
+                                              7 + strlen( CONTENT_TYPE ) );
 
-        sprintf( psz_separator_block, "%s\r\n%s\r\n", psz_separator,
+        sprintf( psz_separator_block, "%s\r\n%s\r\n\r\n", psz_separator,
                                       CONTENT_TYPE );
 
         p_header = block_New( p_mux, strlen( psz_separator_block ) );
@@ -211,14 +211,14 @@
     i_count = p_fifo->i_depth;
     while( i_count > 0 )
     {
-        block_t *p_length = block_New( p_mux, 25 );
         block_t *p_data = block_FifoGet( p_fifo );
         sout_AccessOutWrite( p_mux->p_access,
                              block_Duplicate( p_sys->p_separator ) );
         memset( psz_content_length, 0, 25 );
         snprintf( psz_content_length, 25, "Content-Length: %i\r\n\r\n",
                                           p_data->i_buffer );
-        memcpy( p_length->p_buffer, psz_content_length, 25 );
+        block_t *p_length = block_New( p_mux, strlen(psz_content_length) );
+        memcpy( p_length->p_buffer, psz_content_length, p_length->i_buffer );
         sout_AccessOutWrite( p_mux->p_access, p_length );
         sout_AccessOutWrite( p_mux->p_access, p_data );
 
-- 
Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20070502/c87f61b7/attachment.pgp


More information about the pkg-multimedia-maintainers mailing list