]> git.sesse.net Git - vlc/commitdiff
So-called "RTSP" VOD: advertise the actual audio frequency
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 2 Jul 2008 18:04:34 +0000 (21:04 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 2 Jul 2008 18:06:14 +0000 (21:06 +0300)
This closes #1657. We have to use the same frequency as the RTP stream
output, otherwise, it's not going to work...

modules/misc/rtsp.c

index c162b1877bf0bab5c3d13e3573cc57584771bdb3..d590c9ac306606723f5f58c40ed6d8858db1dc68 100644 (file)
@@ -523,7 +523,7 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
             break;
         case VLC_FOURCC( 'm', 'p', 'g', 'a' ):
             p_es->i_payload_type = 14;
-            p_es->psz_rtpmap = strdup( "MPA/90000" );
+            asprintf( &p_es->psz_rtpmap, "MPA/%d", p_fmt->audio.i_rate );
             break;
         case VLC_FOURCC( 'm', 'p', 'g', 'v' ):
             p_es->i_payload_type = 32;
@@ -531,7 +531,7 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
             break;
         case VLC_FOURCC( 'a', '5', '2', ' ' ):
             p_es->i_payload_type = p_media->i_payload_type++;
-            p_es->psz_rtpmap = strdup( "ac3/90000" );
+            asprintf( &p_es->psz_rtpmap, "ac3/%d", p_fmt->audio.i_rate );
             break;
         case VLC_FOURCC( 'H', '2', '6', '3' ):
             p_es->i_payload_type = p_media->i_payload_type++;