From: Gildas Bazin Date: Fri, 8 Aug 2003 16:50:27 +0000 (+0000) Subject: * src/input/input_clock.c: reverted the patch that caused the regression in 0.6.1 X-Git-Tag: 0.6.2~41 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=48ab4989596b30c06377d605c78bd0612b6b0c86;p=vlc * src/input/input_clock.c: reverted the patch that caused the regression in 0.6.1 * modules/packetizer/copy.c: fixed segfault * modules/gui/wxwindows/wxwindows.cpp: compilation fix for wxWindows 2.5 cvs --- diff --git a/modules/gui/wxwindows/wxwindows.cpp b/modules/gui/wxwindows/wxwindows.cpp index 1ec8fbcc48..517e4b6d12 100644 --- a/modules/gui/wxwindows/wxwindows.cpp +++ b/modules/gui/wxwindows/wxwindows.cpp @@ -2,7 +2,7 @@ * wxwindows.cpp : wxWindows plugin for vlc ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: wxwindows.cpp,v 1.28 2003/07/29 21:14:10 gbazin Exp $ + * $Id: wxwindows.cpp,v 1.29 2003/08/08 16:50:27 gbazin Exp $ * * Authors: Gildas Bazin * @@ -223,7 +223,11 @@ static void Init( intf_thread_t *p_intf ) #endif /* Hack to pass the p_intf pointer to the new wxWindow Instance object */ +#ifdef wxTheApp + wxApp::SetInstance( new Instance( p_intf ) ); +#else wxTheApp = new Instance( p_intf ); +#endif #if defined( WIN32 ) #if !defined(__BUILTIN__) diff --git a/modules/packetizer/copy.c b/modules/packetizer/copy.c index 5f37d27948..8ca80568cc 100644 --- a/modules/packetizer/copy.c +++ b/modules/packetizer/copy.c @@ -2,7 +2,7 @@ * copy.c ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: copy.c,v 1.12 2003/07/31 19:02:23 fenrir Exp $ + * $Id: copy.c,v 1.13 2003/08/08 16:50:27 gbazin Exp $ * * Authors: Laurent Aimar * Eric Petit @@ -93,8 +93,10 @@ static int Open( vlc_object_t *p_this ) static int Run( decoder_fifo_t *p_fifo ) { packetizer_thread_t *p_pack; + int i_ret; - msg_Dbg( p_fifo, "Running copy packetizer (fcc=%4.4s)", (char*)&p_fifo->i_fourcc ); + msg_Dbg( p_fifo, "Running copy packetizer (fcc=%4.4s)", + (char*)&p_fifo->i_fourcc ); p_pack = malloc( sizeof( packetizer_thread_t ) ); memset( p_pack, 0, sizeof( packetizer_thread_t ) ); @@ -117,9 +119,10 @@ static int Run( decoder_fifo_t *p_fifo ) DecoderError( p_pack->p_fifo ); } + i_ret = p_pack->p_fifo->b_error ? VLC_EGENERIC : VLC_SUCCESS; End( p_pack ); - return( p_pack->p_fifo->b_error ? VLC_EGENERIC : VLC_SUCCESS ); + return( i_ret ); } /***************************************************************************** diff --git a/src/input/input_clock.c b/src/input/input_clock.c index 97add19939..99f4860817 100644 --- a/src/input/input_clock.c +++ b/src/input/input_clock.c @@ -2,7 +2,7 @@ * input_clock.c: Clock/System date convertions, stream management ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: input_clock.c,v 1.40 2003/08/01 00:05:07 gbazin Exp $ + * $Id: input_clock.c,v 1.41 2003/08/08 16:50:27 gbazin Exp $ * * Authors: Christophe Massiot * @@ -97,13 +97,6 @@ static mtime_t ClockToSysdate( input_thread_t * p_input, i_sysdate /= 27; i_sysdate /= 1000; i_sysdate += (mtime_t)p_pgrm->sysdate_ref; - - if ( i_sysdate < mdate() - CR_MAX_GAP - || i_sysdate > mdate() + CR_MAX_GAP ) - { - msg_Warn( p_input, "Bogus clock encountered, resetting" ); - ClockNewRef( p_pgrm, i_clock, i_sysdate = mdate() ); - } } return( i_sysdate ); @@ -235,11 +228,11 @@ void input_ClockManageRef( input_thread_t * p_input, p_pgrm = p_input->stream.p_selected_program; } - if( ( p_pgrm->i_synchro_state != SYNCHRO_OK ) || ( i_clock == 0 ) ) + if( ( p_pgrm->i_synchro_state != SYNCHRO_OK ) || + ( i_clock == 0 && p_pgrm->last_cr != 0 ) ) { /* Feed synchro with a new reference point. */ ClockNewRef( p_pgrm, i_clock, - i_clock == 0 ? mdate() : p_pgrm->last_pts + CR_MEAN_PTS_GAP > mdate() ? p_pgrm->last_pts + CR_MEAN_PTS_GAP : mdate() ); p_pgrm->i_synchro_state = SYNCHRO_OK;