]> git.sesse.net Git - vlc/blobdiff - modules/access/v4l.c
Don't print a message a malloc failed.
[vlc] / modules / access / v4l.c
index 67172dbb66084a8f9e64ee8682b64c384a0ebc8f..00ccfb674059072c4b24a9c22c93c49f8e030660 100644 (file)
@@ -32,7 +32,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_input.h>
 #include <vlc_demux.h>
 #include <vlc_access.h>
@@ -142,12 +143,12 @@ static void Close( vlc_object_t * );
 
 static int i_norm_list[] =
     { VIDEO_MODE_AUTO, VIDEO_MODE_SECAM, VIDEO_MODE_PAL, VIDEO_MODE_NTSC };
-static const char *psz_norm_list_text[] =
+static const char *const psz_norm_list_text[] =
     { N_("Automatic"), N_("SECAM"), N_("PAL"),  N_("NTSC") };
 
 vlc_module_begin();
-    set_shortname( _("Video4Linux") );
-    set_description( _("Video4Linux input") );
+    set_shortname( N_("Video4Linux") );
+    set_description( N_("Video4Linux input") );
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_ACCESS );
 
@@ -1415,7 +1416,7 @@ static block_t *GrabAudio( demux_t *p_demux )
     }
 
     p_block->i_pts = p_block->i_dts =
-        mdate() - I64C(1000000) * (mtime_t)i_correct /
+        mdate() - INT64_C(1000000) * (mtime_t)i_correct /
         2 / ( p_sys->b_stereo ? 2 : 1) / p_sys->i_sample_rate;
 
     return p_block;
@@ -1439,7 +1440,7 @@ static uint8_t *GrabCapture( demux_t *p_demux )
             return NULL;
         }
 
-        if( p_demux->b_die )
+        if( !vlc_object_alive (p_demux) )
         {
             return NULL;
         }