msg_Dbg( p_demux, "extra pmt specified (pid=%d)", i_pid );
PIDInit( pmt, VLC_TRUE, NULL );
+ pmt->psi->i_prg = 1;
+ pmt->psi->prg = malloc( sizeof(ts_prg_psi_t) );
/* FIXME we should also ask for a number */
pmt->psi->prg[0]->handle =
dvbpsi_AttachPMT( 1, (dvbpsi_pmt_callback)PMTCallBack,
}
else
{
+#ifndef UNDER_CE
uint64_t i_ck = strtoull( psz, NULL, 16 );
+#else
+ uint64_t i_ck = strtoll( psz, NULL, 16 );
+#endif
uint8_t ck[8];
int i;
for( i = 0; i < 8; i++ )
}
}
+ /* ISO/IEC 13818-1 2.7.5: if no pts and no dts, then dts == pts */
+ if( i_pts >= 0 && i_dts < 0 )
+ i_dts = i_pts;
+
if( p_pes )
{
block_t *p_block;
{
/* Small video artifacts are usually better then
* dropping full frames */
- pid->es->p_pes->i_flags |= BLOCK_FLAG_DISCONTINUITY;
+ pid->es->p_pes->i_flags |= BLOCK_FLAG_CORRUPTED;
}
}
}
msg_Dbg( p_demux, " * es pid=%d type=%d dr->i_tag=0x%x",
p_es->i_pid, p_es->i_type, p_dr->i_tag );
- if( p_dr->i_tag == 0x6a )
+ if( p_dr->i_tag == 0x05 )
{
- pid->es->fmt.i_cat = AUDIO_ES;
- pid->es->fmt.i_codec = VLC_FOURCC( 'a', '5', '2', ' ' );
+ /* Registration Descriptor */
+ if( p_dr->i_length != 4 )
+ {
+ msg_Warn( p_demux, "invalid Registration Descriptor" );
+ }
+ else
+ {
+ if( !memcmp( p_dr->p_data, "AC-3", 4 ) )
+ {
+ /* ATSC with stream_type 0x81 (but this descriptor
+ * is then not mandatory */
+ pid->es->fmt.i_cat = AUDIO_ES;
+ pid->es->fmt.i_codec = VLC_FOURCC('a','5','2',' ');
+ }
+ else if( !memcmp( p_dr->p_data, "DTS1", 4 ) ||
+ !memcmp( p_dr->p_data, "DTS2", 4 ) ||
+ !memcmp( p_dr->p_data, "DTS3", 4 ) )
+ {
+ /*registration descriptor(ETSI TS 101 154 Annex F)*/
+ pid->es->fmt.i_cat = AUDIO_ES;
+ pid->es->fmt.i_codec = VLC_FOURCC('d','t','s',' ');
+ }
+ else if( !memcmp( p_dr->p_data, "BSSD", 4 ) )
+ {
+ pid->es->fmt.i_cat = AUDIO_ES;
+ pid->es->fmt.i_codec = VLC_FOURCC('l','p','c','m');
+ }
+ else
+ {
+ msg_Warn( p_demux,
+ "unknown Registration Descriptor (%4.4s)",
+ p_dr->p_data );
+ }
+ }
+
}
- else if( p_dr->i_tag == 0x05 )
+ else if( p_dr->i_tag == 0x6a )
{
-
- /* DTS registration descriptor (ETSI TS 101 154 Annex F) */
+ /* DVB with stream_type 0x06 */
pid->es->fmt.i_cat = AUDIO_ES;
- pid->es->fmt.i_codec = VLC_FOURCC( 'd', 't', 's', ' ' );
+ pid->es->fmt.i_codec = VLC_FOURCC( 'a', '5', '2', ' ' );
}
else if( p_dr->i_tag == 0x73 )
{
p_es->fmt.subs.dvb.i_id =
sub->p_subtitle[n].i_composition_page_id;
/* Hack, FIXME */
- pid->es->fmt.subs.dvb.i_id |=
+ p_es->fmt.subs.dvb.i_id |=
((int)sub->p_subtitle[n].i_ancillary_page_id << 16);
TAB_APPEND( pid->i_extra_es, pid->extra_es, p_es );