]> git.sesse.net Git - vlc/commitdiff
codec: faad: fail if no extradata
authorFrancois Cartegnie <fcvlcdev@free.fr>
Fri, 6 Jun 2014 17:40:25 +0000 (19:40 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Fri, 6 Jun 2014 17:42:19 +0000 (19:42 +0200)
both packetizer and codec requiring extra

modules/codec/faad.c

index 9aaaed63e9977324bdccdbe1d6588f5a90e9637f..aaf978a3aa07cba80e5132e6ef7b576c9fcfe489 100644 (file)
@@ -130,6 +130,12 @@ static int Open( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
+    if ( !p_dec->fmt_in.i_extra )
+    {
+        msg_Err( p_dec, "cannot initialize faad wihtout codec extradata" );
+        return VLC_EGENERIC;
+    }
+
     /* Allocate the memory needed to store the decoder's structure */
     if( ( p_dec->p_sys = p_sys = malloc( sizeof(*p_sys) ) ) == NULL )
         return VLC_ENOMEM;