[vlc-devel] [PATCH 2/3] [mux/ogg] Fix calculation with uninitialized value

davidf+nntp at woaf.net davidf+nntp at woaf.net
Tue Nov 4 15:48:21 CET 2008


From: David Flynn <davidf at rd.bbc.co.uk>

In particular, calculating i_dts and i_length in p_stream.

Signed-off-by: David Flynn <davidf at rd.bbc.co.uk>
---
 modules/mux/ogg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
index e9dd721..d750426 100644
--- a/modules/mux/ogg.c
+++ b/modules/mux/ogg.c
@@ -320,7 +320,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
 
     msg_Dbg( p_mux, "adding input" );
 
-    p_input->p_sys = p_stream = malloc( sizeof( ogg_stream_t ) );
+    p_input->p_sys = p_stream = calloc( 1, sizeof( ogg_stream_t ) );
     if( !p_stream )
         return VLC_ENOMEM;
 
-- 
1.5.6.5




More information about the vlc-devel mailing list