From: RĂ©mi Denis-Courmont Date: Thu, 3 Jul 2008 15:03:48 +0000 (+0300) Subject: RTP/MPA: the standard frequency is 90kHz (MPEG PCR), oops X-Git-Tag: 0.9.0-test2~310 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d17a6f2c13b47ff20dc01af6c0ccdeb087de59d3;p=vlc RTP/MPA: the standard frequency is 90kHz (MPEG PCR), oops --- diff --git a/modules/demux/rtp.c b/modules/demux/rtp.c index 3ea499ab7f..c05cb210b3 100644 --- a/modules/demux/rtp.c +++ b/modules/demux/rtp.c @@ -674,7 +674,7 @@ static int Demux (demux_t *demux) msg_Dbg (demux, "detected MPEG Audio"); pt.init = mpa_init; pt.decode = mpa_decode; - pt.frequency = 44100; + pt.frequency = 90000; break; case 32: diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c index c31a4bda93..463af330ec 100644 --- a/modules/misc/rtsp.c +++ b/modules/misc/rtsp.c @@ -524,7 +524,7 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt ) case VLC_FOURCC( 'm', 'p', 'g', 'a' ): case VLC_FOURCC( 'm', 'p', '3', ' ' ): p_es->i_payload_type = 14; - asprintf( &p_es->psz_rtpmap, "MPA/%d", p_fmt->audio.i_rate ); + p_es->psz_rtpmap = strdup( "MPA/90000" ); break; case VLC_FOURCC( 'm', 'p', 'g', 'v' ): p_es->i_payload_type = 32; diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c index d09419372e..61b4d3ab5a 100644 --- a/modules/stream_out/rtp.c +++ b/modules/stream_out/rtp.c @@ -1055,6 +1055,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) case VLC_FOURCC( 'm', 'p', '3', ' ' ): id->i_payload_type = 14; id->psz_enc = "MPA"; + id->i_clock_rate = 90000; /* not 44100 */ id->pf_packetize = rtp_packetize_mpa; break; case VLC_FOURCC( 'm', 'p', 'g', 'v' ):