]> git.sesse.net Git - vlc/blobdiff - modules/access_filter/timeshift.c
Remove change_unsafe() no-op.
[vlc] / modules / access_filter / timeshift.c
index 6567e22c57cde4579c3030dd69f4dc7999c3a22d..a1e353a51e882f927bea53b7999270b7fbf250bd 100644 (file)
@@ -73,7 +73,6 @@ vlc_module_begin();
     add_integer( "timeshift-granularity", 50, NULL, GRANULARITY_TEXT,
                  GRANULARITY_LONGTEXT, true );
     add_directory( "timeshift-dir", 0, 0, DIR_TEXT, DIR_LONGTEXT, false );
-        change_unsafe();
     add_bool( "timeshift-force", false, NULL, FORCE_TEXT, FORCE_LONGTEXT,
               false );
 vlc_module_end();
@@ -279,6 +278,7 @@ static void* Thread( vlc_object_t* p_this )
     access_t     *p_src = p_access->p_source;
     block_t      *p_block;
 
+    int canc = vlc_savecancel ();
     while( vlc_object_alive (p_access) )
     {
         /* Get a new block from the source */
@@ -357,6 +357,7 @@ static void* Thread( vlc_object_t* p_this )
 
     /* Send dummy packet to avoid deadlock in Block() */
     block_FifoPut( p_sys->p_fifo, block_New( p_access, 0 ) );
+    vlc_restorecancel (canc);
     return NULL;
 }
 
@@ -602,8 +603,8 @@ static char *GetTmpFilePath( access_t *p_access )
 #endif
     }
 
-    if( asprintf( &psz_filename_base, "%s/vlc-timeshift-%d-%d-",
-              psz_dir, getpid(), p_access->i_object_id ) == -1 )
+    if( asprintf( &psz_filename_base, "%s/vlc-timeshift-%d-%p-",
+              psz_dir, getpid(), p_access ) == -1 )
         psz_filename_base = NULL;
     free( psz_dir );