]> git.sesse.net Git - vlc/blobdiff - modules/codec/theora.c
Use calloc when applicable (decoders).
[vlc] / modules / codec / theora.c
index c0d70be94b96c6d625eca9deb8a01c4e257971fc..a7c6eafcc870c187099c014b9fb6271f44b46479 100644 (file)
@@ -139,8 +139,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     }
 
     /* Allocate the memory needed to store the decoder's structure */
-    if( ( p_dec->p_sys = p_sys =
-          (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
+    if( ( p_dec->p_sys = p_sys = malloc(sizeof(*p_sys)) ) == NULL )
         return VLC_ENOMEM;
     p_dec->p_sys->b_packetizer = false;