[vlc-devel] commit: Flush all subtitles when recycling a vout. (Laurent Aimar )

git version control git at videolan.org
Sat Feb 14 00:46:33 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Feb 13 23:53:31 2009 +0100| [fc2955ef9e13862df69763506ddfa3a25a6eb79e] | committer: Laurent Aimar 

Flush all subtitles when recycling a vout.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fc2955ef9e13862df69763506ddfa3a25a6eb79e
---

 src/input/ressource.c               |    3 +++
 src/video_output/vout_subpictures.c |    4 +++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/input/decoder b/src/input/decoder
deleted file mode 100644
index e69de29..0000000
diff --git a/src/input/ressource.c b/src/input/ressource.c
index 11003d9..a1698bd 100644
--- a/src/input/ressource.c
+++ b/src/input/ressource.c
@@ -30,6 +30,7 @@
 
 #include <vlc_common.h>
 #include <vlc_vout.h>
+#include <vlc_osd.h>
 #include <vlc_aout.h>
 #include <vlc_sout.h>
 #include "../libvlc.h"
@@ -243,6 +244,8 @@ static vout_thread_t *RequestVout( input_ressource_t *p_ressource,
         {
             msg_Dbg( p_ressource->p_input, "saving a free vout" );
             vout_Flush( p_vout, 1 );
+            spu_Control( p_vout->p_spu, SPU_CHANNEL_CLEAR, -1 );
+
             p_ressource->p_vout_free = p_vout;
         }
         return NULL;
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index eca71ab..1dc316f 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -1675,7 +1675,9 @@ static void SpuClearChannel( spu_t *p_spu, int i_channel )
         spu_heap_entry_t *p_entry = &p_sys->heap.p_entry[i_subpic];
         subpicture_t *p_subpic = p_entry->p_subpicture;
 
-        if( !p_subpic || p_subpic->i_channel != i_channel )
+        if( !p_subpic )
+            continue;
+        if( p_subpic->i_channel != i_channel && ( i_channel != -1 || p_subpic->i_channel == DEFAULT_CHAN ) )
             continue;
 
         /* You cannot delete subpicture outside of spu_SortSubpictures */




More information about the vlc-devel mailing list