]> git.sesse.net Git - vlc/blobdiff - plugins/mpeg/input_ps.c
* Bug fixes and enhancements in the Gtk+/Gnome interfaces.
[vlc] / plugins / mpeg / input_ps.c
index 970d58f409f0ce6961b7deaaf060bb45b497d9e7..b9190e360daba5e7656f804063057e76bd618467 100644 (file)
@@ -2,7 +2,7 @@
  * input_ps.c: PS demux and packet management
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ps.c,v 1.8 2001/02/20 07:49:13 sam Exp $
+ * $Id: input_ps.c,v 1.11 2001/03/15 01:42:20 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -205,14 +205,15 @@ static void PSInit( input_thread_t * p_input )
             }
 
             /* File too big. */
-            if( p_input->stream.pp_areas[0]->i_tell > INPUT_PREPARSE_LENGTH )
+            if( p_input->stream.p_selected_area->i_tell >
+                                                    INPUT_PREPARSE_LENGTH )
             {
                 break;
             }
         }
         rewind( p_method->stream );
         vlc_mutex_lock( &p_input->stream.stream_lock );
-        p_input->stream.pp_areas[0]->i_tell = 0;
+        p_input->stream.p_selected_area->i_tell = 0;
         if( p_demux_data->b_has_PSM )
         {
             /* (The PSM decoder will care about spawning the decoders) */
@@ -300,7 +301,6 @@ static void PSInit( input_thread_t * p_input )
  *****************************************************************************/
 static void PSEnd( input_thread_t * p_input )
 {
-    free( p_input->stream.p_demux_data );
     free( p_input->p_plugin_data );
 }
 
@@ -328,7 +328,7 @@ static __inline__ int SafeRead( input_thread_t * p_input, byte_t * p_buffer,
         }
     }
     vlc_mutex_lock( &p_input->stream.stream_lock );
-    p_input->stream.pp_areas[0]->i_tell += i_len;
+    p_input->stream.p_selected_area->i_tell += i_len;
     vlc_mutex_unlock( &p_input->stream.stream_lock );
     return( 0 );
 }
@@ -371,7 +371,7 @@ static int PSRead( input_thread_t * p_input,
                 /* It is common for MPEG-1 streams to pad with zeros
                  * (although it is forbidden by the recommendation), so
                  * don't bother everybody in this case. */
-                intf_WarnMsg( 1, "Garbage at input (%x)", i_startcode );
+                intf_WarnMsg( 1, "Garbage at input (%.8x)", i_startcode );
             }
 
             while( (i_startcode & 0xFFFFFF00) != 0x100L )
@@ -470,7 +470,7 @@ static void PSSeek( input_thread_t * p_input, off_t i_position )
     /* A little bourrin but should work for a while --Meuuh */
     fseeko( p_method->stream, i_position, SEEK_SET );
 
-    p_input->stream.pp_areas[0]->i_tell = i_position;
+    p_input->stream.p_selected_area->i_tell = i_position;
 }
 
 /*