Mercurial > libavformat.hg
changeset 5500:fc0a32a383d3 libavformat
Check the URL used for the SDP destination.
Patch by Martin Storsjo (martin AT martin DOT st)
author | lucabe |
---|---|
date | Thu, 07 Jan 2010 08:11:56 +0000 |
parents | b63f760bb483 |
children | 89259491d541 |
files | sdp.c |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 <string.h> #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];