Commit 773ff0e0 authored by Eric Petit's avatar Eric Petit

+ vout_subpictures.c: don't check only the first subpicture_t to see

   if we need blending & rendering modules (fixes text messages which
   were missing sometimes)
parent 54be9f30
...@@ -364,8 +364,16 @@ void vout_DestroySubPicture( vout_thread_t *p_vout, subpicture_t *p_subpic ) ...@@ -364,8 +364,16 @@ void vout_DestroySubPicture( vout_thread_t *p_vout, subpicture_t *p_subpic )
void vout_RenderSubPictures( vout_thread_t *p_vout, picture_t *p_pic_dst, void vout_RenderSubPictures( vout_thread_t *p_vout, picture_t *p_pic_dst,
picture_t *p_pic_src, subpicture_t *p_subpic ) picture_t *p_pic_src, subpicture_t *p_subpic )
{ {
/* Get lock */
vlc_mutex_lock( &p_vout->subpicture_lock );
/* Check i_status again to make sure spudec hasn't destroyed the subpic */
while( p_subpic != NULL && p_subpic->i_status != FREE_SUBPICTURE )
{
subpicture_region_t *p_region = p_subpic->p_region;
/* Load the blending module */ /* Load the blending module */
if( !p_vout->p_blend && p_subpic && p_subpic->p_region ) if( !p_vout->p_blend && p_region )
{ {
p_vout->p_blend = vlc_object_create( p_vout, sizeof(filter_t) ); p_vout->p_blend = vlc_object_create( p_vout, sizeof(filter_t) );
vlc_object_attach( p_vout->p_blend, p_vout ); vlc_object_attach( p_vout->p_blend, p_vout );
...@@ -383,7 +391,7 @@ void vout_RenderSubPictures( vout_thread_t *p_vout, picture_t *p_pic_dst, ...@@ -383,7 +391,7 @@ void vout_RenderSubPictures( vout_thread_t *p_vout, picture_t *p_pic_dst,
} }
/* Load the text rendering module */ /* Load the text rendering module */
if( !p_vout->p_text && p_subpic && p_subpic->p_region ) if( !p_vout->p_text && p_region )
{ {
p_vout->p_text = vlc_object_create( p_vout, sizeof(filter_t) ); p_vout->p_text = vlc_object_create( p_vout, sizeof(filter_t) );
vlc_object_attach( p_vout->p_text, p_vout ); vlc_object_attach( p_vout->p_text, p_vout );
...@@ -402,14 +410,6 @@ void vout_RenderSubPictures( vout_thread_t *p_vout, picture_t *p_pic_dst, ...@@ -402,14 +410,6 @@ void vout_RenderSubPictures( vout_thread_t *p_vout, picture_t *p_pic_dst,
module_Need( p_vout->p_text, "text renderer", 0, 0 ); module_Need( p_vout->p_text, "text renderer", 0, 0 );
} }
/* Get lock */
vlc_mutex_lock( &p_vout->subpicture_lock );
/* Check i_status again to make sure spudec hasn't destroyed the subpic */
while( p_subpic != NULL && p_subpic->i_status != FREE_SUBPICTURE )
{
subpicture_region_t *p_region = p_subpic->p_region;
if( p_subpic->pf_render ) if( p_subpic->pf_render )
{ {
p_subpic->pf_render( p_vout, p_pic_dst, p_subpic ); p_subpic->pf_render( p_vout, p_pic_dst, p_subpic );
......
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