]> git.sesse.net Git - vlc/blobdiff - src/misc/update.c
Remove picture quantization table (same reason as qtype)
[vlc] / src / misc / update.c
index ad58887fc64bbb83a4b6705cd60d3d59817791c6..c4fde538cf60b5daf36fbc1e8efdb8b44e1d509e 100644 (file)
@@ -74,9 +74,7 @@
  * Remaining text is a required description of the update
  */
 
-#if defined( UNDER_CE )
-# define UPDATE_OS_SUFFIX "-ce"
-#elif defined( WIN64 )
+#if defined( WIN64 )
 # define UPDATE_OS_SUFFIX "-win-x64"
 #elif defined( WIN32 )
 # define UPDATE_OS_SUFFIX "-win-x86"
@@ -143,7 +141,7 @@ void update_Delete( update_t *p_update )
 
     if( p_update->p_download )
     {
-        vlc_object_kill( p_update->p_download );
+        vlc_atomic_set( &p_update->p_download->aborted, 1 );
         vlc_join( p_update->p_download->thread, NULL );
         vlc_object_release( p_update->p_download );
     }
@@ -494,7 +492,7 @@ void update_Download( update_t *p_update, const char *psz_destdir )
     // If the object already exist, destroy it
     if( p_update->p_download )
     {
-        vlc_object_kill( p_update->p_download );
+        vlc_atomic_set( &p_update->p_download->aborted, 1 );
         vlc_join( p_update->p_download->thread, NULL );
         vlc_object_release( p_update->p_download );
     }
@@ -509,6 +507,7 @@ void update_Download( update_t *p_update, const char *psz_destdir )
     p_update->p_download = p_udt;
     p_udt->psz_destdir = psz_destdir ? strdup( psz_destdir ) : NULL;
 
+    vlc_atomic_set(&p_udt->aborted, 0);
     vlc_clone( &p_udt->thread, update_DownloadReal, p_udt, VLC_THREAD_PRIORITY_LOW );
 }
 
@@ -589,7 +588,7 @@ static void* update_DownloadReal( void *obj )
     if( p_progress == NULL )
         goto end;
 
-    while( vlc_object_alive( p_udt ) &&
+    while( !vlc_atomic_get( &p_udt->aborted ) &&
            ( i_read = stream_Read( p_stream, p_buffer, 1 << 10 ) ) &&
            !dialog_ProgressCancelled( p_progress ) )
     {
@@ -617,7 +616,7 @@ static void* update_DownloadReal( void *obj )
     fclose( p_file );
     p_file = NULL;
 
-    if( vlc_object_alive( p_udt ) &&
+    if( !vlc_atomic_get( &p_udt->aborted ) &&
         !dialog_ProgressCancelled( p_progress ) )
     {
         dialog_ProgressDestroy( p_progress );