]> git.sesse.net Git - vlc/blobdiff - modules/codec/cmml/intf.c
* ALL: separation of the SPU engine from the VOUT.
[vlc] / modules / codec / cmml / intf.c
index 511b9b33b7bfc2d81ab28c436c80f8b5e70ad3a4..1222afb8a611f5460ffa559a72822fb5498a0fbe 100644 (file)
  *****************************************************************************/
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
-#include <unistd.h>
 
 #include <vlc/vlc.h>
+
+#ifdef HAVE_UNISTD_H
+#    include <unistd.h>
+#endif
+
 #include <vlc/decoder.h>
+#include <vlc/input.h>
 #include <vlc/intf.h>
 #include <vlc/vout.h>
 
 #include <osd.h>
 
-#include "stream_control.h"
-#include "input_ext-intf.h"
-#include "input_ext-dec.h"
-
 #include "vlc_keys.h"
 
 #include "browser_open.h"
@@ -150,24 +151,11 @@ void E_(CloseIntf) ( vlc_object_t *p_this )
 
     /* Erase the anchor text description from the video output if it exists */
     p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
-    if( p_vout != NULL && p_vout->p_subpicture != NULL )
+    if( p_vout )
     {
-        subpicture_t *p_subpic;
-        int          i_subpic;
-
-        for( i_subpic = 0; i_subpic < VOUT_MAX_SUBPICTURES; i_subpic++ )
-        {
-            p_subpic = &p_vout->p_subpicture[i_subpic];
-
-            if( p_subpic != NULL &&
-              ( p_subpic->i_status == RESERVED_SUBPICTURE
-                || p_subpic->i_status == READY_SUBPICTURE ) )
-            {
-                vout_DestroySubPicture( p_vout, p_subpic );
-            }
-        }
+        spu_Control( p_vout->p_spu, SPU_CHANNEL_CLEAR, DEFAULT_CHAN );
+        vlc_object_release( p_vout );
     }
-    if( p_vout ) vlc_object_release( p_vout );
 
     var_DelCallback( p_intf->p_vlc, "key-pressed", KeyEvent, p_intf );
 
@@ -843,7 +831,7 @@ static int DisplayAnchor( intf_thread_t *p_intf,
         /* TODO: p_subpicture doesn't have the proper i_x and i_y
          * coordinates.  Need to look at the subpicture display system to
          * work out why. */
-        if ( vout_ShowTextAbsolute( p_vout, SOLO_CHAN,
+        if ( vout_ShowTextAbsolute( p_vout, DEFAULT_CHAN,
                 psz_anchor_description, p_style, OSD_ALIGN_BOTTOM,
                 i_margin_h, i_margin_v, i_now, 0 ) == VLC_SUCCESS )
         {