]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/atmo/atmo.cpp
Do not call vlc_thread_ready with non-waiting vlc_thread_create
[vlc] / modules / video_filter / atmo / atmo.cpp
index 79b4ddb486465ee7993e6899b10f868d2aa46d7e..e78bb4cdf099314acf8e87097c76911fb529da59 100644 (file)
@@ -373,7 +373,7 @@ add_integer_with_range(CFG_PREFIX "SatWinSize",   3, 0, 5, NULL,
 add_integer(CFG_PREFIX "filtermode", (int)afmCombined, NULL,
             FILTERMODE_TEXT, FILTERMODE_LONGTEXT, false );
 
-change_integer_list(pi_filtermode_values, ppsz_filtermode_descriptions, 0 );
+change_integer_list(pi_filtermode_values, ppsz_filtermode_descriptions, NULL );
 
 add_integer_with_range(CFG_PREFIX "MeanLength",    300, 300, 5000, NULL,
                        MEANLENGTH_TEXT, MEANLENGTH_LONGTEXT, false);
@@ -555,7 +555,7 @@ typedef struct
 
 } fadethread_t;
 
-static void FadeToColorThread(fadethread_t *p_fadethread);
+static void *FadeToColorThread(vlc_object_t *);
 
 
 /*****************************************************************************
@@ -1723,8 +1723,9 @@ static picture_t * Filter( filter_t *p_filter, picture_t *p_pic )
 * to a target color defined in p_fadethread struct
 * use for: Fade to Pause Color,  and Fade to End Color
 *****************************************************************************/
-static void FadeToColorThread(fadethread_t *p_fadethread)
+static void *FadeToColorThread(vlc_object_t *obj)
 {
+    fadethread_t *p_fadethread = (fadethread_t *)obj;
     filter_sys_t *p_sys = (filter_sys_t *)p_fadethread->p_filter->p_sys;
     int i_steps_done = 0;
     int i_index;
@@ -1736,10 +1737,9 @@ static void FadeToColorThread(fadethread_t *p_fadethread)
     int i_src_green;
     int i_src_blue;
 
-    vlc_thread_ready( p_fadethread );
-
     uint8_t *p_source = NULL;
 
+    int canc = vlc_savecancel ();
     /* initialize AtmoWin for this thread! */
     AtmoInitialize(p_fadethread->p_filter , true);
 
@@ -1824,6 +1824,7 @@ static void FadeToColorThread(fadethread_t *p_fadethread)
     }
     /* call indirect to OleUnitialize() for this thread */
     AtmoFinalize(p_fadethread->p_filter, 0);
+    vlc_restorecancel (canc);
 }
 
 /*****************************************************************************