]> git.sesse.net Git - vlc/blobdiff - modules/demux/cdg.c
fix album art caching for files without artist/album tags
[vlc] / modules / demux / cdg.c
index 9d9c0454dea3a52418fe228dbf3a3382a05638e0..e0087571357d2d0119c2ee54ae020a062e53e175 100644 (file)
@@ -45,8 +45,7 @@ vlc_module_begin ()
     set_subcategory( SUBCAT_INPUT_DEMUX )
     set_capability( "demux", 3 )
     set_callbacks( Open, Close )
-    add_shortcut( "cdg" )
-    add_shortcut( "subtitle" )
+    add_shortcut( "cdg", "subtitle" )
 vlc_module_end ()
 
 /*****************************************************************************
@@ -87,9 +86,13 @@ static int Open( vlc_object_t * p_this )
 //        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;
 
     /* */
     es_format_Init( &p_sys->fmt, VIDEO_ES, VLC_CODEC_CDG );