]> git.sesse.net Git - vlc/blobdiff - modules/demux/nuv.c
Qt4: dialog_Fatal back-end (both modal and non-modal)
[vlc] / modules / demux / nuv.c
index fb4ba3159a4321d3192f09eca8badb2a045785b9..c6a87b45ac6fea1580c9cd0af234c289b0c37bc9 100644 (file)
 static int  Open  ( vlc_object_t * );
 static void Close ( vlc_object_t * );
 
-vlc_module_begin();
-    set_category( CAT_INPUT );
-    set_subcategory( SUBCAT_INPUT_DEMUX );
-    set_description( N_("Nuv demuxer") );
-    set_capability( "demux", 145 );
-    set_callbacks( Open, Close );
-    add_shortcut( "nuv" );
-vlc_module_end();
+vlc_module_begin ()
+    set_category( CAT_INPUT )
+    set_subcategory( SUBCAT_INPUT_DEMUX )
+    set_description( N_("Nuv demuxer") )
+    set_capability( "demux", 145 )
+    set_callbacks( Open, Close )
+    add_shortcut( "nuv" )
+vlc_module_end ()
 
 /*****************************************************************************
  * Local prototypes
@@ -385,7 +385,9 @@ static int Demux( demux_t *p_demux )
     }
 
     /* */
-    p_data = stream_Block( p_demux->s, fh.i_length );
+    if( ( p_data = stream_Block( p_demux->s, fh.i_length ) ) == NULL )
+        return 0;
+
     p_data->i_dts = (int64_t)fh.i_timecode * 1000;
     p_data->i_pts = (fh.i_type == 'V') ? 0 : p_data->i_dts;
 
@@ -785,7 +787,7 @@ static int SeekTableLoad( demux_t *p_demux, demux_sys_t *p_sys )
         {
             p_kfa_table = malloc( fh.i_length );
 
-            if( p_seek_table == NULL )
+            if( p_kfa_table == NULL )
             {
                 free( p_seek_table );
                 return VLC_ENOMEM;