From: Laurent Aimar Date: Fri, 13 Feb 2009 22:53:31 +0000 (+0100) Subject: Flush all subtitles when recycling a vout. X-Git-Tag: 1.0.0-pre1~694 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=fc2955ef9e13862df69763506ddfa3a25a6eb79e;p=vlc Flush all subtitles when recycling a vout. --- diff --git a/src/input/decoder b/src/input/decoder deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/input/ressource.c b/src/input/ressource.c index 11003d9a61..a1698bdca3 100644 --- a/src/input/ressource.c +++ b/src/input/ressource.c @@ -30,6 +30,7 @@ #include #include +#include #include #include #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 eca71ab723..1dc316ff4a 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 */