]> git.sesse.net Git - vlc/blobdiff - modules/codec/faad.c
Try to setup avcodec audio format as soon as possible.
[vlc] / modules / codec / faad.c
index fd5636efbf8a4109d8510952f420aa0c2835c5fe..e050a94bc0e15293f45ca1502f5998f249bd1437 100644 (file)
@@ -123,8 +123,7 @@ static int Open( 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;
 
     /* Open a faad context */
@@ -157,6 +156,7 @@ static int Open( vlc_object_t *p_this )
                           p_dec->fmt_in.i_extra,
                           &i_rate, &i_channels ) < 0 )
         {
+            msg_Err( p_dec, "Failed to initialize faad using extra data" );
             return VLC_EGENERIC;
         }