Commit 638c790e authored by lucabe's avatar lucabe

Check the URL used for the SDP destination.

Patch by Martin Storsjo (martin AT martin DOT st)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21056 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 64c42ee2
......@@ -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 @@ static int sdp_get_address(char *dest_addr, int size, int *ttl, const char *url)
{
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];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment