# HG changeset patch # User lucabe # Date 1262851916 0 # Node ID fc0a32a383d382a36263d3dd83f782c73346aa94 # Parent b63f760bb483785f6d1ece23d746380650382478 Check the URL used for the SDP destination. Patch by Martin Storsjo (martin AT martin DOT st) diff -r b63f760bb483 -r fc0a32a383d3 sdp.c --- a/sdp.c Wed Jan 06 21:51:20 2010 +0000 +++ b/sdp.c Thu Jan 07 08:11:56 2010 +0000 @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include "libavutil/avstring.h" #include "libavutil/base64.h" #include "avformat.h" @@ -72,10 +73,19 @@ { int port; const char *p; + char proto[32]; - url_split(NULL, 0, NULL, 0, dest_addr, size, &port, NULL, 0, url); + url_split(proto, sizeof(proto), NULL, 0, dest_addr, size, &port, NULL, 0, url); *ttl = 0; + + if (strcmp(proto, "rtp")) { + /* The url isn't for the actual rtp sessions, + * don't parse out anything else than the destination. + */ + return 0; + } + p = strchr(url, '?'); if (p) { char buff[64];