View Single Post
  #84  
Old 04-24-2013, 12:07 PM
KSV KSV is offline
Senior Member
 
Join Date: Apr 2011
Posts: 853
KSV is on a distinguished road
Cool

Re: Customized rtmpdump binaries with patch file


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;
            }
        }
Reply With Quote