+ else if( p_stream->i_codec == VLC_FOURCC('d','t','s',' ') )
+ {
+ /* DTS registration descriptor (ETSI TS 101 154 Annex F) */
+
+ /* DTS format identifier, frame size 1024 - FIXME */
+ uint8_t data[4] = { 0x44, 0x54, 0x53, 0x32 };
+ dvbpsi_PMTESAddDescriptor( p_es, 0x05, 4, data );
+ }
+ else if( p_stream->i_codec == VLC_FOURCC('t','e','l','x') )
+ {
+ if( p_stream->i_decoder_specific_info )
+ {
+ dvbpsi_PMTESAddDescriptor( p_es, 0x56,
+ p_stream->i_decoder_specific_info,
+ p_stream->p_decoder_specific_info );
+ }
+ continue;
+ }
+ else if( p_stream->i_codec == VLC_FOURCC('d','v','b','s') )
+ {
+ /* DVB subtitles */
+ if( p_stream->i_decoder_specific_info )
+ {
+ /* pass-through from the TS demux */
+ dvbpsi_PMTESAddDescriptor( p_es, 0x59,
+ p_stream->i_decoder_specific_info,
+ p_stream->p_decoder_specific_info );
+ }
+#ifdef _DVBPSI_DR_59_H_
+ else
+ {
+ /* from the dvbsub transcoder */
+ dvbpsi_subtitling_dr_t descr;
+ dvbpsi_subtitle_t sub;
+ dvbpsi_descriptor_t *p_descr;
+
+ memcpy( sub.i_iso6392_language_code, p_stream->lang, 3 );
+ sub.i_subtitling_type = 0x10; /* no aspect-ratio criticality */
+ sub.i_composition_page_id = p_stream->i_es_id & 0xFF;
+ sub.i_ancillary_page_id = p_stream->i_es_id >> 16;
+
+ descr.i_subtitles_number = 1;
+ descr.p_subtitle[0] = sub;
+
+ p_descr = dvbpsi_GenSubtitlingDr( &descr, 0 );
+ /* Work around bug in old libdvbpsi */ p_descr->i_length = 8;
+ dvbpsi_PMTESAddDescriptor( p_es, p_descr->i_tag,
+ p_descr->i_length, p_descr->p_data );
+ }
+#endif /* _DVBPSI_DR_59_H_ */
+ continue;
+ }