Commit 48ab4989 authored by Gildas Bazin's avatar Gildas Bazin

* 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
parent 417b4c29
......@@ -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 <gbazin@netcourrier.com>
*
......@@ -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__)
......
......@@ -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 <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
......@@ -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 );
}
/*****************************************************************************
......
......@@ -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 <massiot@via.ecp.fr>
*
......@@ -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;
......
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