- msg_Dbg( p_demux, "found FMC_descriptor declaring sl packetization on es_id=%d", i_es_id );
-
- p_es->p_mpeg4desc = NULL;
+ switch( p_dr->i_tag )
+ {
+ case 0x1f: /* FMC Descriptor */
+ while( i_length >= 3 && !p_esdescr )
+ {
+ i_es_id = ( p_dr->p_data[0] << 8 ) | p_dr->p_data[1];
+ p_esdescr = GetMPEG4DescByEsId( p_pmt->iod, i_es_id );
+ /* FIXME: add flexmux channel */
+ i_length -= 3;
+ if( p_esdescr )
+ msg_Dbg( p_demux, "found FMC_descriptor declaring sl packetization on es_id=%"PRIu16, i_es_id );
+ }
+ break;
+ case 0x1e: /* SL Descriptor */
+ if( i_length == 2 )
+ {
+ i_es_id = ( p_dr->p_data[0] << 8 ) | p_dr->p_data[1];
+ p_esdescr = GetMPEG4DescByEsId( p_pmt->iod, i_es_id );
+ if( p_esdescr )
+ msg_Dbg( p_demux, "found SL_descriptor declaring sl packetization on es_id=%"PRIu16, i_es_id );
+ }
+ break;
+ default:
+ break;
+ }