[vlc-devel] commit: RTP/MPA: the standard frequency is 90kHz (MPEG PCR), oops ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Jul 3 17:02:26 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Thu Jul  3 18:03:48 2008 +0300| [d17a6f2c13b47ff20dc01af6c0ccdeb087de59d3]

RTP/MPA: the standard frequency is 90kHz (MPEG PCR), oops

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d17a6f2c13b47ff20dc01af6c0ccdeb087de59d3
---

 modules/demux/rtp.c      |    2 +-
 modules/misc/rtsp.c      |    2 +-
 modules/stream_out/rtp.c |    1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/rtp.c b/modules/demux/rtp.c
index 3ea499a..c05cb21 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 c31a4bd..463af33 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 d094193..61b4d3a 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' ):




More information about the vlc-devel mailing list