]> git.sesse.net Git - vlc/commitdiff
Used Used vout_control_Push for vout_FlushSubpictureChannel .
authorLaurent Aimar <fenrir@videolan.org>
Tue, 25 May 2010 19:21:44 +0000 (21:21 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 25 May 2010 19:21:44 +0000 (21:21 +0200)
src/video_output/control.h
src/video_output/video_output.c

index 6e1f7d7f6a2e958183be730189c5d1201064fbec..4654736a8def1aff8e7cc01c4d5d742c8919e068 100644 (file)
@@ -40,6 +40,7 @@ enum {
     VOUT_CONTROL_STOP,
 #endif
     VOUT_CONTROL_SUBPICTURE,            /* subpicture */
+    VOUT_CONTROL_FLUSH_SUBPICTURE,      /* integer */
     VOUT_CONTROL_OSD_TITLE,             /* string */
     VOUT_CONTROL_CHANGE_FILTERS,        /* string */
     VOUT_CONTROL_CHANGE_SUB_FILTERS,    /* string */
index 248829ee291e566adba6eb7042d7602e2e296ef8..7c1c8bd8bfbcbee241d88abca5149486c83d5afd 100644 (file)
@@ -361,7 +361,8 @@ int vout_RegisterSubpictureChannel( vout_thread_t *vout )
 }
 void vout_FlushSubpictureChannel( vout_thread_t *vout, int channel )
 {
-    spu_ClearChannel(vout->p->p_spu, channel);
+    vout_control_PushInteger(&vout->p->control, VOUT_CONTROL_FLUSH_SUBPICTURE,
+                             channel);
 }
 
 /* vout_Control* are usable by anyone at anytime */
@@ -758,6 +759,12 @@ static void ThreadDisplaySubpicture(vout_thread_t *vout,
 {
     spu_DisplaySubpicture(vout->p->p_spu, subpicture);
 }
+
+static void ThreadFlushSubpicture(vout_thread_t *vout, int channel)
+{
+    spu_ClearChannel(vout->p->p_spu, channel);
+}
+
 static void ThreadDisplayOsdTitle(vout_thread_t *vout, const char *string)
 {
     if (!vout->p->title.show)
@@ -1113,6 +1120,9 @@ static void *Thread(void *object)
                 ThreadDisplaySubpicture(vout, cmd.u.subpicture);
                 cmd.u.subpicture = NULL;
                 break;
+            case VOUT_CONTROL_FLUSH_SUBPICTURE:
+                ThreadFlushSubpicture(vout, cmd.u.integer);
+                break;
             case VOUT_CONTROL_OSD_TITLE:
                 ThreadDisplayOsdTitle(vout, cmd.u.string);
                 break;