Commit 362eb374 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: ts: replace if/else with switch

parent 34d9105e
...@@ -4084,39 +4084,36 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_pmt ) ...@@ -4084,39 +4084,36 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_pmt )
pid->i_pid = p_es->i_pid; pid->i_pid = p_es->i_pid;
pid->b_seen = p_sys->pid[p_es->i_pid].b_seen; pid->b_seen = p_sys->pid[p_es->i_pid].b_seen;
if( p_es->i_type == 0x10 || p_es->i_type == 0x11 || switch( p_es->i_type )
p_es->i_type == 0x12 || p_es->i_type == 0x0f )
{ {
case 0x10:
case 0x11:
case 0x12:
case 0x0f:
PMTSetupEsISO14496( p_demux, pid, prg, p_es ); PMTSetupEsISO14496( p_demux, pid, prg, p_es );
} break;
else if( p_es->i_type == 0x06 ) case 0x06:
{
PMTSetupEs0x06( p_demux, pid, p_es ); PMTSetupEs0x06( p_demux, pid, p_es );
} break;
else if( p_es->i_type == 0xEA ) case 0x83:
{
PMTSetupEs0xEA( p_demux, pid, p_es );
}
else if( p_es->i_type == 0xd1 )
{
PMTSetupEs0xD1( p_demux, pid, p_es );
}
else if( p_es->i_type == 0xa0 )
{
PMTSetupEs0xA0( p_demux, pid, p_es );
}
else if ( p_es->i_type == 0x83 )
{
/* LPCM (audio) */ /* LPCM (audio) */
PMTSetupEs0x83( p_pmt, pid ); PMTSetupEs0x83( p_pmt, pid );
} break;
else if( registration_type == TS_REGISTRATION_HDMV ) case 0xa0:
{ PMTSetupEs0xA0( p_demux, pid, p_es );
PMTSetupEsHDMV( pid, p_es ); break;
} case 0xd1:
else if( p_es->i_type >= 0x80 ) PMTSetupEs0xD1( p_demux, pid, p_es );
{ break;
PMTSetupEsRegistration( p_demux, pid, p_es ); case 0xEA:
PMTSetupEs0xEA( p_demux, pid, p_es );
break;
default:
if( registration_type == TS_REGISTRATION_HDMV )
PMTSetupEsHDMV( pid, p_es );
else if( p_es->i_type >= 0x80 )
PMTSetupEsRegistration( p_demux, pid, p_es );
break;
} }
if( pid->es->fmt.i_cat == AUDIO_ES || if( pid->es->fmt.i_cat == AUDIO_ES ||
......
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