Commit fc2955ef authored by Laurent Aimar's avatar Laurent Aimar

Flush all subtitles when recycling a vout.

parent d66d8f7d
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_vout.h> #include <vlc_vout.h>
#include <vlc_osd.h>
#include <vlc_aout.h> #include <vlc_aout.h>
#include <vlc_sout.h> #include <vlc_sout.h>
#include "../libvlc.h" #include "../libvlc.h"
...@@ -243,6 +244,8 @@ static vout_thread_t *RequestVout( input_ressource_t *p_ressource, ...@@ -243,6 +244,8 @@ static vout_thread_t *RequestVout( input_ressource_t *p_ressource,
{ {
msg_Dbg( p_ressource->p_input, "saving a free vout" ); msg_Dbg( p_ressource->p_input, "saving a free vout" );
vout_Flush( p_vout, 1 ); vout_Flush( p_vout, 1 );
spu_Control( p_vout->p_spu, SPU_CHANNEL_CLEAR, -1 );
p_ressource->p_vout_free = p_vout; p_ressource->p_vout_free = p_vout;
} }
return NULL; return NULL;
......
...@@ -1675,7 +1675,9 @@ static void SpuClearChannel( spu_t *p_spu, int i_channel ) ...@@ -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]; spu_heap_entry_t *p_entry = &p_sys->heap.p_entry[i_subpic];
subpicture_t *p_subpic = p_entry->p_subpicture; 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; continue;
/* You cannot delete subpicture outside of spu_SortSubpictures */ /* You cannot delete subpicture outside of spu_SortSubpictures */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment