]> git.sesse.net Git - vlc/blobdiff - modules/demux/xa.c
Fixed support of mov/mp4 with fixed video samples size.
[vlc] / modules / demux / xa.c
index 65b0c97a3d2db78a98da1083eb2ff032f6280212..3e25547da972e615efd429f0962a5419f0fcf896 100644 (file)
@@ -33,8 +33,6 @@
 #include <vlc_plugin.h>
 #include <vlc_demux.h>
 
-#include <vlc_codecs.h>
-
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
@@ -102,9 +100,13 @@ static int Open( vlc_object_t * p_this )
      || ( GetWLE( &p_xa.wBitsPerSample ) != 16) )
         return VLC_EGENERIC;
 
+    p_sys = malloc( sizeof( demux_sys_t ) );
+    if( unlikely( p_sys == NULL ) )
+        return VLC_ENOMEM;
+
     p_demux->pf_demux   = Demux;
     p_demux->pf_control = Control;
-    p_demux->p_sys      = p_sys = malloc( sizeof( demux_sys_t ) );
+    p_demux->p_sys      = p_sys;
     p_sys->p_es         = NULL;
 
     /* skip XA header -- cannot fail */