I've been looking into this issue:
http://stream-recorder.com/forum/hel...te-t19008.html
And I've come to this conclusion:
It seems that when the app is explicitly specified in the command:
Code:
rtmpdump -r "rtmp://185.39.10.134:1735/redirect/" -a "redirect/?token=play@141591954001747" -f "WIN 14,0,0,179" -W "http://www.spasswitz.com/jwplayer5/addplayer/jwplayer.flash.swf" -p "http://www.sitenow.me/embedfr.php?c=1872&width=640&height=360&autostart=true&tk1=6iCVreJJok9hNAu5pszYQ6U0Hq1%2FQQmmVh7x%2FXmsQUrsGyHMPRzN01hTpVpu6A8Ee5J538KCXzWtOYWdt2iL9A%3D%3D&tk2=xk1UrvQ3lZBdhysbnwOqS1qoOA7%2FvG3%2BFYMtZtJ65PU%3D&tk3=QTZ5%2Bx8UqV9oY9WGF1OwCOnvuhBStwHv4DixCuxFg7c%3D" -y "footpluusss_7x1xktw" -o "2014-11-13_05-03-10_footpluusss_7x1xktw.flv" -T "@@stop-stole@@"
And the servers answer with a redirect:
Code:
redirect, STRING: rtmp://185.39.9.162:1735/vod?token=play@141598783902787
The tcUrl is freed due to the RTMP_LF_FTCU flag being set:
Code:
if ((r->Link.lFlags & RTMP_LF_FTCU) && !reconnect)
{
free(r->Link.tcUrl.av_val);
r->Link.tcUrl.av_val = NULL;
r->Link.lFlags ^= RTMP_LF_FTCU;
}
Thus fails to connect.
To solve it I have modified a couple of lines in rtmp.c and parseurl.c:
Code:
if ((r->Link.lFlags & RTMP_LF_FTCU) && !reconnect && !r->Link.redirected)
{
free(r->Link.tcUrl.av_val);
r->Link.tcUrl.av_val = NULL;
r->Link.lFlags ^= RTMP_LF_FTCU;
}
Code:
else if (AVMATCH(&method, &av_close))
{
if (r->Link.redirected)
{
r->Link.redirected = FALSE;
RTMP_Close(r);
r->Link.redirected = FALSE;
RTMP_Log(RTMP_LOGINFO, "trying to connect with redirected url");
RTMP_Connect(r, NULL);
}
And in parseUrl.c instead of:
Code:
if ((!ques) && doubleSlash)
applen -= 1;
to
Code:
if (doubleSlash)
applen -= 1;
With changes from above, everything seems to work but I'm not sure if these changes are safe.
Maybe @KSV can help.