[vlc-commits] demux: ts: don't mess with es type (fix #10244)
Francois Cartegnie
git at videolan.org
Thu Apr 10 12:31:24 CEST 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr 10 12:27:03 2014 +0200| [60044057c53a580482fbe515d86bd5bdaa453dae] | committer: Francois Cartegnie
demux: ts: don't mess with es type (fix #10244)
datatype was changed assuming a cable private type 0x82
without even parsing other registration types.
In that case, it was breaking HDMV which also uses 0x82
for DTS audio.
introduced by 7e3dcdd09c2fac64f00acb360d30f24c74894609
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=60044057c53a580482fbe515d86bd5bdaa453dae
---
modules/demux/ts.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index 450c7cb..9529d2d 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -343,7 +343,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args );
static void PIDInit ( ts_pid_t *pid, bool b_psi, ts_psi_t *p_owner );
static void PIDClean( demux_t *, ts_pid_t *pid );
-static void PIDFillFormat( ts_es_t *es, int i_stream_type );
+static void PIDFillFormat( const ts_es_t *es, int i_stream_type );
static void PATCallBack( void*, dvbpsi_pat_t * );
static void PMTCallBack( void *data, dvbpsi_pmt_t *p_pmt );
@@ -2383,7 +2383,7 @@ static bool GatherData( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk )
return i_ret;
}
-static void PIDFillFormat( ts_es_t *es, int i_stream_type )
+static void PIDFillFormat( const ts_es_t *es, int i_stream_type )
{
es_format_t *fmt = &es->fmt;
@@ -2422,7 +2422,6 @@ static void PIDFillFormat( ts_es_t *es, int i_stream_type )
break;
case 0x82: /* SCTE-27 (sub) */
es_format_Init( fmt, SPU_ES, VLC_CODEC_SCTE_27 );
- es->data_type = TS_ES_DATA_TABLE_SECTION;
break;
case 0x83: /* LPCM (audio) */
es_format_Init( fmt, AUDIO_ES, VLC_CODEC_DVD_LPCM );
@@ -4111,6 +4110,16 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_pmt )
PMTParseEsIso639( p_demux, pid, p_es );
}
+ switch( pid->es->fmt.i_codec )
+ {
+ case VLC_CODEC_SCTE_27:
+ pid->es->data_type = TS_ES_DATA_TABLE_SECTION;
+ break;
+ default:
+ //pid->es->data_type = TS_ES_DATA_PES;
+ break;
+ }
+
pid->es->fmt.i_group = p_pmt->i_program_number;
for( int i = 0; i < pid->i_extra_es; i++ )
pid->extra_es[i]->fmt.i_group = p_pmt->i_program_number;
More information about the vlc-commits
mailing list