[vlc-commits] demux: ts: don't override type before registrations

Francois Cartegnie git at videolan.org
Mon Oct 26 16:59:28 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Oct 26 16:57:09 2015 +0100| [d518c73eb8870dd708879b643c06aaf493df3d66] | committer: Francois Cartegnie

demux: ts: don't override type before registrations

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d518c73eb8870dd708879b643c06aaf493df3d66
---

 modules/demux/mpeg/ts.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 027eb7d..d793945 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -5279,7 +5279,8 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_dvbpsipmt )
 
         ARRAY_APPEND( p_pmt->e_streams, pespid );
 
-        PIDFillFormat( &p_pes->es.fmt, p_dvbpsies->i_type, &p_pes->data_type );
+        ts_es_data_type_t type_change = TS_ES_DATA_PES;
+        PIDFillFormat( &p_pes->es.fmt, p_dvbpsies->i_type, &type_change );
 
         p_pes->i_stream_type = p_dvbpsies->i_type;
         pespid->i_flags |= SEEN(GetPID(p_sys, p_dvbpsies->i_pid));
@@ -5303,6 +5304,8 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_dvbpsipmt )
 
         if ( !b_registration_applied )
         {
+            p_pes->data_type = type_change; /* Only change type if registration has not changed meaning */
+
             switch( p_dvbpsies->i_type )
             {
             case 0x06:



More information about the vlc-commits mailing list