- switch ( i_payload_type )
- {
- case 33:
- msg_Dbg( p_input, "detected TS over RTP" );
- break;
-
- case 14:
- msg_Dbg( p_input, "detected MPEG audio over RTP" );
- if( !p_input->psz_demux || *p_input->psz_demux == '\0' )
- {
- p_input->psz_demux = "mp3";
- }
- break;
-
- case 32:
- msg_Dbg( p_input, "detected MPEG video over RTP" );
- break;
-
- default:
- msg_Dbg( p_input, "no RTP header detected" );
- p_input->pf_read = Read;
- p_input->p_vlc->pf_memcpy( p_buffer, p_tmp_buffer, i_ret );
- return i_ret;
- }
-
- p_input->pf_read = RTPRead;
-
- /* A CSRC extension field is 32 bits in size (4 bytes) */
- if( i_ret < RTP_HEADER_LEN + 4*i_CSRC_count )
- {
- /* Packet is not big enough to hold the complete RTP_HEADER with
- * CSRC extensions.
- */
- msg_Warn( p_input, "RTP input trashing %d bytes", i_ret - i_len );
- return 0;
- }
-
- /* Return the packet without the RTP header. */
- i_ret -= RTP_HEADER_LEN + 4*i_CSRC_count;
-
- if ( (size_t)i_ret > i_len )