]> git.sesse.net Git - vlc/blobdiff - modules/codec/theora.c
codec_fake: use var_CreateGet* when applicable.
[vlc] / modules / codec / theora.c
index 934c6839e5e4721a83471255d904aadcce2d739e..3ac5f120c2946c35a7a453185e3b1de55dc17964 100644 (file)
@@ -602,7 +602,7 @@ struct encoder_sys_t
 static int OpenEncoder( vlc_object_t *p_this )
 {
     encoder_t *p_enc = (encoder_t *)p_this;
-    encoder_sys_t *p_sys = p_enc->p_sys;
+    encoder_sys_t *p_sys;
     ogg_packet header;
     uint8_t *p_extra;
     vlc_value_t val;
@@ -615,7 +615,7 @@ static int OpenEncoder( vlc_object_t *p_this )
     }
 
     /* Allocate the memory needed to store the decoder's structure */
-    if( ( p_sys = (encoder_sys_t *)malloc(sizeof(encoder_sys_t)) ) == NULL )
+    if( ( p_sys = malloc(sizeof(encoder_sys_t)) ) == NULL )
         return VLC_ENOMEM;
     p_enc->p_sys = p_sys;