]> git.sesse.net Git - vlc/blobdiff - src/input/decoder_synchro.c
Use calloc when needed.
[vlc] / src / input / decoder_synchro.c
index 4ff8c7bd046325b064bff2821e1afaca7356f469..b88230ee13fdbe00a8c5cb3fe87cd768aa3c3268 100644 (file)
@@ -161,10 +161,9 @@ struct decoder_synchro_t
  *****************************************************************************/
 decoder_synchro_t * decoder_SynchroInit( decoder_t *p_dec, int i_frame_rate )
 {
-    decoder_synchro_t * p_synchro = malloc( sizeof(*p_synchro) );
-    if ( p_synchro == NULL )
+    decoder_synchro_t * p_synchro = calloc( 1, sizeof(*p_synchro) );
+    if( !p_synchro )
         return NULL;
-    memset( p_synchro, 0, sizeof(*p_synchro) );
 
     p_synchro->p_dec = p_dec;
     p_synchro->b_no_skip = !config_GetInt( p_dec, "skip-frames" );