]> git.sesse.net Git - vlc/blobdiff - modules/access/pvr.c
Export title length in dvdnav access_demux.
[vlc] / modules / access / pvr.c
index 6bd402a38224a9b8225a4dd8526532bf1bd7e277..666987932110e5f266344894facd1eb5f3a7bb18 100644 (file)
@@ -33,6 +33,7 @@
 #include <vlc_plugin.h>
 #include <vlc_access.h>
 #include <vlc_fs.h>
+#include <vlc_url.h>
 
 #include <sys/types.h>
 #include <fcntl.h>
@@ -576,7 +577,7 @@ static int Open( vlc_object_t * p_this )
     p_sys->i_input      = var_CreateGetInteger( p_access, "pvr-channel" );
 
     /* parse command line options */
-    psz_tofree = strdup( p_access->psz_path );
+    psz_tofree = strdup( p_access->psz_location );
     if( !psz_tofree )
     {
         free( p_sys->psz_radiodev );
@@ -592,7 +593,7 @@ static int Open( vlc_object_t * p_this )
         if( *psz_parser == '/' )
         {
             free( p_sys->psz_videodev );
-            p_sys->psz_videodev = strdup( psz_parser );
+            p_sys->psz_videodev = decode_URI_duplicate( psz_parser );
             break;
         }
 
@@ -663,7 +664,7 @@ static int Open( vlc_object_t * p_this )
     free( psz_tofree );
 
     /* open the device */
-    p_sys->i_fd = utf8_open( p_sys->psz_videodev, O_RDWR );
+    p_sys->i_fd = vlc_open( p_sys->psz_videodev, O_RDWR );
     if( p_sys->i_fd < 0 )
     {
         msg_Err( p_access, "Cannot open device %s (%m).",
@@ -773,7 +774,7 @@ static int Open( vlc_object_t * p_this )
         if ( (p_sys->i_frequency >= pi_radio_range[0])
               && (p_sys->i_frequency <= pi_radio_range[1]) )
         {
-            p_sys->i_radio_fd = utf8_open( p_sys->psz_radiodev, O_RDWR );
+            p_sys->i_radio_fd = vlc_open( p_sys->psz_radiodev, O_RDWR );
             if( p_sys->i_radio_fd < 0 )
             {
                 msg_Err( p_access, "Cannot open radio device (%m)." );
@@ -969,7 +970,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
         /* */
         case ACCESS_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
-            *pi_64 = (int64_t)var_GetInteger( p_access, "pvr-caching" ) * 1000;
+            *pi_64 = var_GetInteger( p_access, "pvr-caching" ) * 1000;
             break;
 
         /* */