Commit 60044057 authored by Francois Cartegnie's avatar 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 7e3dcdd0
parent 7a497c95
...@@ -343,7 +343,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ); ...@@ -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 PIDInit ( ts_pid_t *pid, bool b_psi, ts_psi_t *p_owner );
static void PIDClean( demux_t *, ts_pid_t *pid ); 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 PATCallBack( void*, dvbpsi_pat_t * );
static void PMTCallBack( void *data, dvbpsi_pmt_t *p_pmt ); 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 ) ...@@ -2383,7 +2383,7 @@ static bool GatherData( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk )
return i_ret; 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; es_format_t *fmt = &es->fmt;
...@@ -2422,7 +2422,6 @@ static void PIDFillFormat( ts_es_t *es, int i_stream_type ) ...@@ -2422,7 +2422,6 @@ static void PIDFillFormat( ts_es_t *es, int i_stream_type )
break; break;
case 0x82: /* SCTE-27 (sub) */ case 0x82: /* SCTE-27 (sub) */
es_format_Init( fmt, SPU_ES, VLC_CODEC_SCTE_27 ); es_format_Init( fmt, SPU_ES, VLC_CODEC_SCTE_27 );
es->data_type = TS_ES_DATA_TABLE_SECTION;
break; break;
case 0x83: /* LPCM (audio) */ case 0x83: /* LPCM (audio) */
es_format_Init( fmt, AUDIO_ES, VLC_CODEC_DVD_LPCM ); es_format_Init( fmt, AUDIO_ES, VLC_CODEC_DVD_LPCM );
...@@ -4111,6 +4110,16 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_pmt ) ...@@ -4111,6 +4110,16 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_pmt )
PMTParseEsIso639( p_demux, pid, p_es ); 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; pid->es->fmt.i_group = p_pmt->i_program_number;
for( int i = 0; i < pid->i_extra_es; i++ ) for( int i = 0; i < pid->i_extra_es; i++ )
pid->extra_es[i]->fmt.i_group = p_pmt->i_program_number; pid->extra_es[i]->fmt.i_group = p_pmt->i_program_number;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment