From 8772170a108e2540494b48d030ebb0dab22c521f Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Fri, 2 Jan 2004 19:03:46 +0000 Subject: fix possible deadlock with ogm subtitles CVS patchset: 5973 CVS date: 2004/01/02 19:03:46 --- src/libsputext/xine_decoder.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/libsputext/xine_decoder.c b/src/libsputext/xine_decoder.c index edc05afdb..a4727d2e4 100644 --- a/src/libsputext/xine_decoder.c +++ b/src/libsputext/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.72 2003/12/30 02:16:43 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.73 2004/01/02 19:03:46 miguelfreitas Exp $ * */ @@ -526,6 +526,15 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) { } } } + + /* we may never block on ogm mode because we are on the same thread + * as the video decoder. therefore nothing will possibly happen + * (like frames being displayed) if we hang here doing nothing. + * it is possible, but unlikely, that the very first ogm subtitle + * gets dropped because of the following return. + */ + if( this->ogm ) + return; xine_usec_sleep (50000); -- cgit v1.2.3