From 773ff0e065a8d2c3364f1e3b2341c057b9eda599 Mon Sep 17 00:00:00 2001 From: Eric Petit Date: Wed, 1 Sep 2004 18:59:23 +0000 Subject: [PATCH] + 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) --- src/video_output/vout_subpictures.c | 76 ++++++++++++++--------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c index 4f12c37b55..89e0afeff0 100644 --- a/src/video_output/vout_subpictures.c +++ b/src/video_output/vout_subpictures.c @@ -364,44 +364,6 @@ 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, picture_t *p_pic_src, subpicture_t *p_subpic ) { - /* Load the blending module */ - if( !p_vout->p_blend && p_subpic && p_subpic->p_region ) - { - p_vout->p_blend = vlc_object_create( p_vout, sizeof(filter_t) ); - vlc_object_attach( p_vout->p_blend, p_vout ); - p_vout->p_blend->fmt_out.video.i_x_offset = - p_vout->p_blend->fmt_out.video.i_y_offset = 0; - p_vout->p_blend->fmt_out.video.i_aspect = - p_vout->render.i_aspect; - p_vout->p_blend->fmt_out.video.i_chroma = - p_vout->output.i_chroma; - - p_vout->p_blend->fmt_in.video.i_chroma = VLC_FOURCC('Y','U','V','P'); - - p_vout->p_blend->p_module = - module_Need( p_vout->p_blend, "video blending", 0, 0 ); - } - - /* Load the text rendering module */ - if( !p_vout->p_text && p_subpic && p_subpic->p_region ) - { - p_vout->p_text = vlc_object_create( p_vout, sizeof(filter_t) ); - vlc_object_attach( p_vout->p_text, p_vout ); - - p_vout->p_text->fmt_out.video.i_width = - p_vout->p_text->fmt_out.video.i_visible_width = - p_vout->output.i_width; - p_vout->p_text->fmt_out.video.i_height = - p_vout->p_text->fmt_out.video.i_visible_height = - p_vout->output.i_height; - - p_vout->p_text->pf_spu_buffer_new = spu_new_buffer; - p_vout->p_text->pf_spu_buffer_del = spu_del_buffer; - - p_vout->p_text->p_module = - module_Need( p_vout->p_text, "text renderer", 0, 0 ); - } - /* Get lock */ vlc_mutex_lock( &p_vout->subpicture_lock ); @@ -410,6 +372,44 @@ void vout_RenderSubPictures( vout_thread_t *p_vout, picture_t *p_pic_dst, { subpicture_region_t *p_region = p_subpic->p_region; + /* Load the blending module */ + if( !p_vout->p_blend && p_region ) + { + p_vout->p_blend = vlc_object_create( p_vout, sizeof(filter_t) ); + vlc_object_attach( p_vout->p_blend, p_vout ); + p_vout->p_blend->fmt_out.video.i_x_offset = + p_vout->p_blend->fmt_out.video.i_y_offset = 0; + p_vout->p_blend->fmt_out.video.i_aspect = + p_vout->render.i_aspect; + p_vout->p_blend->fmt_out.video.i_chroma = + p_vout->output.i_chroma; + + p_vout->p_blend->fmt_in.video.i_chroma = VLC_FOURCC('Y','U','V','P'); + + p_vout->p_blend->p_module = + module_Need( p_vout->p_blend, "video blending", 0, 0 ); + } + + /* Load the text rendering module */ + if( !p_vout->p_text && p_region ) + { + p_vout->p_text = vlc_object_create( p_vout, sizeof(filter_t) ); + vlc_object_attach( p_vout->p_text, p_vout ); + + p_vout->p_text->fmt_out.video.i_width = + p_vout->p_text->fmt_out.video.i_visible_width = + p_vout->output.i_width; + p_vout->p_text->fmt_out.video.i_height = + p_vout->p_text->fmt_out.video.i_visible_height = + p_vout->output.i_height; + + p_vout->p_text->pf_spu_buffer_new = spu_new_buffer; + p_vout->p_text->pf_spu_buffer_del = spu_del_buffer; + + p_vout->p_text->p_module = + module_Need( p_vout->p_text, "text renderer", 0, 0 ); + } + if( p_subpic->pf_render ) { p_subpic->pf_render( p_vout, p_pic_dst, p_subpic ); -- GitLab