]> git.sesse.net Git - vlc/commitdiff
* modules/demux/mpeg/*: Fixed an uninitialized variable with TS streams
authorChristophe Massiot <massiot@videolan.org>
Tue, 4 Feb 2003 11:07:45 +0000 (11:07 +0000)
committerChristophe Massiot <massiot@videolan.org>
Tue, 4 Feb 2003 11:07:45 +0000 (11:07 +0000)
  (thanks gibalou !).

modules/demux/mpeg/system.c
modules/demux/mpeg/ts.c

index c43f218bf569c4a306f5fc4bff10dd1d8fd4ed53..9fea15b060182739552af70cfa5f800a5816fc31 100644 (file)
@@ -2,7 +2,7 @@
  * system.c: helper module for TS, PS and PES management
  *****************************************************************************
  * Copyright (C) 1998-2002 VideoLAN
- * $Id: system.c,v 1.8 2002/12/06 16:34:07 sam Exp $
+ * $Id: system.c,v 1.9 2003/02/04 11:07:45 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
@@ -187,7 +187,7 @@ static void ParsePES( input_thread_t * p_input, es_descriptor_t * p_es )
             msg_Warn( p_input, "packet corrupted, PES sizes do not match" );
         }
 
-        switch( p_es->i_stream_id )
+        switch( p_header[3] )
         {
         case 0xBC:  /* Program stream map */
         case 0xBE:  /* Padding */
index 1d951cc3a504d0bcb17b3f8fdb13d20ddbd26d90..8d6187387b03f17d273d6ea71a69ccef87a81171 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_ts.c : Transport Stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: ts.c,v 1.14 2003/01/08 16:40:29 fenrir Exp $
+ * $Id: ts.c,v 1.15 2003/02/04 11:07:45 massiot Exp $
  *
  * Authors: Henri Fallon <henri@via.ecp.fr>
  *          Johan Bilien <jobi@via.ecp.fr>
@@ -631,11 +631,17 @@ static void TSDecodePMT( input_thread_t * p_input, es_descriptor_t * p_es )
                     {
                         case MPEG1_VIDEO_ES:
                         case MPEG2_VIDEO_ES:
+                            /* This isn't real, but we don't actually use
+                             * it. */
+                            p_new_es->i_stream_id = 0xE0;
                             p_new_es->i_fourcc = VLC_FOURCC('m','p','g','v');
                             p_new_es->i_cat = VIDEO_ES;
                             break;
                         case MPEG1_AUDIO_ES:
                         case MPEG2_AUDIO_ES:
+                            /* This isn't real, but we don't actually use
+                             * it. */
+                            p_new_es->i_stream_id = 0xC0;
                             p_new_es->i_fourcc = VLC_FOURCC('m','p','g','a');
                             p_new_es->i_cat = AUDIO_ES;
                             break;