]> git.sesse.net Git - vlc/commitdiff
* ./plugins/dummy/input_dummy.c: fixed `vlc vlc:quit'.
authorSam Hocevar <sam@videolan.org>
Sat, 2 Mar 2002 03:51:23 +0000 (03:51 +0000)
committerSam Hocevar <sam@videolan.org>
Sat, 2 Mar 2002 03:51:23 +0000 (03:51 +0000)
   * ./src/input/input.c: initialized uninitialized variables.

include/input_ext-plugins.h
plugins/dummy/input_dummy.c
plugins/fx/scope.c
src/input/input.c

index 8fc70e69f1d65b8fcbdfc90281d7dda09eed1f11..44e464ac73467d145c53af8e906a82903f4200a5 100644 (file)
@@ -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;
         }
index b5561dd37279b2294e803805950db5c97d895189..12428302d00e6751a4d06290af1529b386b32e50 100644 (file)
@@ -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;
 
index ecbc1a85e19ee3d5f5dcf84412616048c3467dba..2b1613d9784a91e14068a6667126710db28dbad1 100644 (file)
@@ -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;
index 480dcb5fbbf5472585d832108daa764f996d785d..3d1a6a6c805fe0c42561c8ab26b7764cf2c99cc8 100644 (file)
@@ -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 ) )
         {