Quote:
Originally Posted by KSV
try updating the relevant block with following code.
Code:
if (code == 302 && RTMP_FindFirstMatchingProperty(&obj2, &av_redirect, &p))
{
AMFProp_GetString(&p, &redirect);
r->Link.redirected = TRUE;
char *playpath = "//playpath";
int len = redirect.av_len + strlen(playpath);
char *url = malloc(len + 1);
memcpy(url, redirect.av_val, redirect.av_len);
memcpy(url + redirect.av_len, playpath, strlen(playpath));
url[len] = '\0';
r->Link.tcUrl.av_val = url;
r->Link.tcUrl.av_len = redirect.av_len;
RTMP_ParseURL(url, &r->Link.protocol, &r->Link.hostname, &parsedPort, &r->Link.playpath0, &r->Link.app);
if (parsedPort)
r->Link.port = parsedPort;
}
}
|
Thanks KSV, it's SOLVED.
Do you think it's worthy to look at the possible memory leaks pointed out by valgrind, like the
Code:
char *url = malloc(len + 1)
Never being freed, or they're false positive?
Thanks again