Changeset 50f3a306ea5c05c6505594e785c508cdf1c5d9cb

Show
Ignore:
Timestamp:
03/19/08 18:31:15 (6 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1205947875 +0200
git-parent:

[28737ffcb575641e55b9ec9b04fe3e5c6e130141]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1205947875 +0200
Message:

SAP: m= subtype is not supposed to be a number in with the "udp"
protocol, so don't try to use atoi() there.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/services_discovery/sap.c

    rac175b3 r50f3a30  
    970970    { 
    971971        msg_Dbg (p_obj, "missing SDP media subtype: %s", sdp_proto); 
    972         p_sdp->i_media_type = 0; 
     972        free (sdp_proto); 
     973        return VLC_EGENERIC; 
    973974    } 
    974975    else 
    975976    { 
    976977        *subtype++ = '\0'; 
    977         p_sdp->i_media_type = atoi (subtype); 
    978     } 
    979     if (p_sdp->i_media_type == 0) 
    980          p_sdp->i_media_type = 33; 
     978        /* FIXME: check for multiple payload types in RTP/AVP case. 
     979         * FIXME: check for "mpeg" subtype in raw udp case. */ 
     980        if (!strcasecmp (sdp_proto, "udp")) 
     981            p_sdp->i_media_type = 33; 
     982        else 
     983            p_sdp->i_media_type = atoi (subtype); 
     984    } 
    981985 
    982986    /* RTP protocol, nul, VLC shortcut, nul, flags byte as follow: