]> git.sesse.net Git - vlc/blobdiff - modules/access/pvr.c
Don't print a message a malloc failed.
[vlc] / modules / access / pvr.c
index bfc1eb3bcb1a5f0dd4fe7ff4495455ce5f3e81d5..e7d255ca435399a34df79d939671b3daf4f71ca9 100644 (file)
@@ -29,7 +29,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_access.h>
 
 #include <sys/types.h>
@@ -113,19 +114,19 @@ static void Close( vlc_object_t * );
 #define CHAN_LONGTEXT N_( "Channel of the card to use (Usually, 0 = tuner, " \
     "1 = composite, 2 = svideo)" )
 
-static int i_norm_list[] =
+static const int i_norm_list[] =
     { V4L2_STD_UNKNOWN, V4L2_STD_SECAM, V4L2_STD_PAL, V4L2_STD_NTSC };
-static const char *psz_norm_list_text[] =
+static const char *const psz_norm_list_text[] =
     { N_("Automatic"), N_("SECAM"), N_("PAL"),  N_("NTSC") };
 
-static int i_bitrates[] = { 0, 1 };
-static const char *psz_bitrates_list_text[] = { N_("vbr"), N_("cbr") };
+static const int i_bitrates[] = { 0, 1 };
+static const char *const psz_bitrates_list_text[] = { N_("vbr"), N_("cbr") };
 
-static int pi_radio_range[2] = { 65000, 108000 };
+static const int pi_radio_range[2] = { 65000, 108000 };
 
 vlc_module_begin();
-    set_shortname( _("PVR") );
-    set_description( _("IVTV MPEG Encoding cards input") );
+    set_shortname( N_("PVR") );
+    set_description( N_("IVTV MPEG Encoding cards input") );
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_ACCESS );
     set_capability( "access", 0 );
@@ -1082,7 +1083,7 @@ static ssize_t Read( access_t * p_access, uint8_t * p_buffer, size_t i_len )
 
     do
     {
-        if( p_access->b_die )
+        if( !vlc_object_alive (p_access) )
             return 0;
 
         ufd.revents = 0;