[vlc-devel] commit: SAP: add PCM payload types which are now supported ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Jul 5 16:10:45 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Jul  5 17:12:13 2008 +0300| [54eff3ece763ace8cbfa3120913c9e77f23c14d6]

SAP: add PCM payload types which are now supported

This should allow VLC to receive from PulseAudio RTP (untested)

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

 modules/services_discovery/sap.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index 4aa0f1f..58d2819 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -394,10 +394,19 @@ static int OpenDemux( vlc_object_t *p_this )
     {
         p_sdp->psz_uri = NULL;
     }
-    if( p_sdp->i_media_type != 33 && p_sdp->i_media_type != 32 &&
-        p_sdp->i_media_type != 14 )
-        goto error;
-
+    switch (p_sdp->i_media_type)
+    {   /* Should be in sync with modules/demux/rtp.c */
+        case  0: /* PCMU/8000 */
+        case  8: /* PCMA/8000 */
+        case 10: /* L16/44100/2 */
+        case 11: /* L16/44100 */
+        case 14: /* MPA/90000 */
+        case 32: /* MPV/90000 */
+        case 33: /* MP2/90000 */
+            break;
+        default:
+            goto error;
+    }
     if( p_sdp->psz_uri == NULL ) goto error;
 
     p_demux->p_sys = (demux_sys_t *)malloc( sizeof(demux_sys_t) );




More information about the vlc-devel mailing list