From: Sam Hocevar Date: Tue, 14 Aug 2001 00:00:04 +0000 (+0000) Subject: * Fixed a crash in subtitle rendering. X-Git-Tag: 0.2.83~9 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=6c67a6b17bf9b88c4d51b89824e0c767960aa97b;p=vlc * Fixed a crash in subtitle rendering. * Activated old crappy subtitle rendering in overlay mode (ugly but probably better than having no subtitles at all). --- diff --git a/ChangeLog b/ChangeLog index d86d256091..e2634ec5b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ HEAD + * Fixed a crash in subtitle rendering. + * Activated old crappy subtitle rendering in overlay mode (ugly but + probably better than having no subtitles at all). * Added proper Conflicts: rules in debian/control. * configure.in fixes for BSD/OS. * Added BSD/OS libdvd by Steven M. Schultz in diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index 55a5aa2d75..f95a783ed8 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -5,7 +5,7 @@ * thread, and destroy a previously oppened video output thread. ***************************************************************************** * Copyright (C) 2000 VideoLAN - * $Id: video_output.c,v 1.136 2001/08/03 18:03:32 gbazin Exp $ + * $Id: video_output.c,v 1.137 2001/08/14 00:00:04 sam Exp $ * * Authors: Vincent Seguin * @@ -873,8 +873,8 @@ static int InitThread( vout_thread_t *p_vout ) if( p_vout->pf_create( p_vout ) ) { /* If pf_create has failed then we have to make sure - * pf_destroy won't be called, because the plugin should have - * cleaned up all its mess */ + * pf_destroy won't be called, because the plugin should have + * cleaned up all its mess */ p_vout->pf_destroy = NULL; return( 1 ); } @@ -922,8 +922,8 @@ static int InitThread( vout_thread_t *p_vout ) if( p_vout->pf_init( p_vout ) ) { /* If pf_init has failed then we have to make sure - * pf_destroy won't be called, because the plugin should have - * cleaned up all its mess */ + * pf_destroy won't be called, because the plugin should have + * cleaned up all its mess */ p_vout->pf_destroy = NULL; return( 1 ); } @@ -2001,11 +2001,17 @@ static void RenderSubPicture( vout_thread_t *p_vout, picture_t *p_pic, switch( p_subpic->i_type ) { case DVD_SUBPICTURE: /* DVD subpicture unit */ - vout_RenderRGBSPU( p_pic, p_subpic, - &p_vout->p_buffer[ p_vout->i_buffer_index ], - p_vout->i_bytes_per_pixel, - p_vout->i_bytes_per_line ); - /* vout_RenderYUVSPU( p_pic, p_subpic ); */ + if( p_vout->b_need_render ) + { + vout_RenderRGBSPU( p_pic, p_subpic, + &p_vout->p_buffer[ p_vout->i_buffer_index ], + p_vout->i_bytes_per_pixel, + p_vout->i_bytes_per_line ); + } + else + { + vout_RenderYUVSPU( p_pic, p_subpic ); + } break; case TEXT_SUBPICTURE: /* single line text */