Commit b5231008 authored by Sam Hocevar's avatar Sam Hocevar

   * ./plugins/dummy/input_dummy.c: fixed `vlc vlc:quit'.
   * ./src/input/input.c: initialized uninitialized variables.
parent 3bb60ad0
......@@ -3,7 +3,7 @@
* but exported to plug-ins
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
* $Id: input_ext-plugins.h,v 1.18 2002/03/01 00:33:17 massiot Exp $
* $Id: input_ext-plugins.h,v 1.19 2002/03/02 03:51:23 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -151,7 +151,7 @@ static __inline__ void input_NullPacket( input_thread_t * p_input,
if( (p_pad_data = input_NewPacket( p_input->p_method_data,
PADDING_PACKET_SIZE )) == NULL )
{
intf_ErrMsg("Out of memory");
intf_ErrMsg("input error: no new packet");
p_input->b_error = 1;
return;
}
......@@ -171,7 +171,7 @@ static __inline__ void input_NullPacket( input_thread_t * p_input,
{
if( (p_pes = input_NewPES( p_input->p_method_data )) == NULL )
{
intf_ErrMsg("Out of memory");
intf_ErrMsg("input error: no PES packet");
p_input->b_error = 1;
return;
}
......
......@@ -2,7 +2,7 @@
* input_dummy.c: dummy input plugin, to manage "vlc:***" special options
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: input_dummy.c,v 1.16 2002/03/01 00:33:18 massiot Exp $
* $Id: input_dummy.c,v 1.17 2002/03/02 03:51:23 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -97,6 +97,7 @@ void _M( demux_getfunctions )( function_list_t * p_function_list )
static int DummyOpen( input_thread_t * p_input )
{
p_input->stream.i_method = INPUT_METHOD_NONE;
/* Force dummy demux plug-in */
p_input->psz_demux = "vlc";
return( 0 );
......@@ -190,6 +191,7 @@ static int DummyDemux( struct input_thread_s *p_input )
switch( p_method->i_command )
{
case COMMAND_QUIT:
p_main->p_intf->b_die = 1;
p_input->b_die = 1;
break;
......
......@@ -2,7 +2,7 @@
* scope.c : Scope effect module
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: scope.c,v 1.3 2002/03/01 16:07:00 sam Exp $
* $Id: scope.c,v 1.4 2002/03/02 03:51:23 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -234,9 +234,13 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *p_buffer, int i_size )
/* We only support 2 channels for now */
for( i_index = 0 ; i_index < 2 ; i_index++ )
{
ppp_area[i_index][0] = p_outpic->p[0].p_pixels + i_index * p_outpic->p[0].i_lines / p_aout->i_channels * p_outpic->p[0].i_pitch;
ppp_area[i_index][1] = p_outpic->p[1].p_pixels + i_index * p_outpic->p[1].i_lines / p_aout->i_channels * p_outpic->p[1].i_pitch;
ppp_area[i_index][2] = p_outpic->p[2].p_pixels + i_index * p_outpic->p[2].i_lines / p_aout->i_channels * p_outpic->p[2].i_pitch;
int j;
for( j = 0 ; j < 3 ; j++ )
{
ppp_area[i_index][j] =
p_outpic->p[j].p_pixels + i_index * p_outpic->p[j].i_lines
/ p_aout->i_channels * p_outpic->p[j].i_pitch;
}
}
for( i_index = 0, p_sample = (u16*)p_buffer;
......@@ -274,7 +278,7 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *p_buffer, int i_size )
/* Display the picture - FIXME: find a better date :-) */
vout_DatePicture( p_aout->p_sys->p_vout, p_outpic,
p_aout->date + i_image * 10000 );
p_aout->date + i_image * 20000 );
vout_DisplayPicture( p_aout->p_sys->p_vout, p_outpic );
p_buffer += SCOPE_WIDTH * 4;
......
......@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input.c,v 1.182 2002/03/02 03:15:22 stef Exp $
* $Id: input.c,v 1.183 2002/03/02 03:51:23 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Alexis Guillard <alexis.guillard@bt.com>
......@@ -145,6 +145,9 @@ input_thread_t *input_CreateThread ( playlist_item_t *p_item, int *pi_status )
p_input->pf_set_area = NULL;
p_input->pf_set_program = NULL;
p_input->i_bufsize = 0;
p_input->i_mtu = 0;
/* Initialize statistics */
p_input->c_loops = 0;
p_input->stream.c_packets_read = 0;
......@@ -528,7 +531,7 @@ static int InitThread( input_thread_t * p_input )
p_input->i_bufsize = INPUT_DEFAULT_BUFSIZE;
}
if( p_input->p_current_data == NULL )
if( p_input->p_current_data == NULL && p_input->pf_read != NULL )
{
while( !input_FillBuffer( p_input ) )
{
......
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