[vlc-devel] commit: Fix calculation with uninitialized value (David Flynn )

git version control git at videolan.org
Tue Nov 4 16:58:44 CET 2008


vlc | branch: master | David Flynn <davidf at rd.bbc.co.uk> | Tue Nov  4 14:48:21 2008 +0000| [520b8ffc5b40098537df1b08e24ba0f3afba2692] | committer: Rémi Denis-Courmont 

Fix calculation with uninitialized value

In particular, calculating i_dts and i_length in p_stream.

Signed-off-by: David Flynn <davidf at rd.bbc.co.uk>
Signed-off-by: Rémi Denis-Courmont <rdenis at simphalempin.com>

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

 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;
 




More information about the vlc-devel mailing list