]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/osdmenu.c
Merge branch 1.0-bugfix
[vlc] / modules / video_filter / osdmenu.c
index 82816578b1a0a323a28aabbc2707152aabe6b6d6..e287f392cd6de721b3b2abfc2d6f2370bdfc9427 100644 (file)
@@ -218,6 +218,7 @@ static int CreateFilter ( vlc_object_t *p_this )
     if( p_sys->p_menu == NULL )
         goto error;
 
+    /* FIXME: this plugin is not at all thread-safe w.r.t. callbacks */
     p_sys->p_menu->i_position = p_sys->i_position;
 
     /* Check if menu position was overridden */
@@ -262,7 +263,7 @@ static int CreateFilter ( vlc_object_t *p_this )
                         MouseEvent, p_sys );
     }
 
-    es_format_Init( &p_filter->fmt_out, SPU_ES, VLC_FOURCC( 's','p','u',' ' ) );
+    es_format_Init( &p_filter->fmt_out, SPU_ES, VLC_CODEC_SPU );
     p_filter->fmt_out.i_priority = 0;
 
     return VLC_SUCCESS;
@@ -289,7 +290,7 @@ static void DestroyFilter( vlc_object_t *p_this )
     var_DelCallback( p_filter, OSD_CFG "update", OSDMenuCallback, p_sys );
     var_DelCallback( p_filter, OSD_CFG "alpha", OSDMenuCallback, p_sys );
 
-    if( p_sys )
+    if( p_sys ) /* FIXME: <-- WTF??? what about the 4 ones above? */
     {
         var_DelCallback( p_sys->p_menu, "osd-menu-update",
                          OSDMenuUpdateEvent, p_filter );
@@ -369,7 +370,7 @@ static subpicture_region_t *create_text_region( filter_t *p_filter, subpicture_t
 
     /* Create new SPU region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC( 'T','E','X','T' );
+    fmt.i_chroma = VLC_CODEC_TEXT;
     fmt.i_aspect = VOUT_ASPECT_FACTOR;
     fmt.i_sar_num = fmt.i_sar_den = 1;
     fmt.i_width = fmt.i_visible_width = i_width;
@@ -407,13 +408,13 @@ static subpicture_region_t *create_picture_region( filter_t *p_filter, subpictur
 
     /* Create new SPU region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = (p_pic == NULL) ? VLC_FOURCC('Y','U','V','P') : VLC_FOURCC('Y','U','V','A');
+    fmt.i_chroma = (p_pic == NULL) ? VLC_CODEC_YUVP : VLC_CODEC_YUVA;
     fmt.i_aspect = VOUT_ASPECT_FACTOR;
     fmt.i_sar_num = fmt.i_sar_den = 1;
     fmt.i_width = fmt.i_visible_width = i_width;
     fmt.i_height = fmt.i_visible_height = i_height;
     fmt.i_x_offset = fmt.i_y_offset = 0;
-    if( fmt.i_chroma == VLC_FOURCC('Y','U','V','P') )
+    if( fmt.i_chroma == VLC_CODEC_YUVP )
     {
         fmt.p_palette = &palette;
         fmt.p_palette->i_entries = 0;