[rtmpdump] r522 - trunk/librtmp/rtmp.c

Andreas Öman andreas at lonelycoder.com
Tue Jun 29 08:56:16 CEST 2010


On 06/29/2010 03:39 AM, hyc wrote:
> Author: hyc
> Date: Tue Jun 29 03:39:49 2010
> New Revision: 522
>
> Log:
> Cleanup prev commit

Uh-oh. This change broke build.



>
> Modified:
>     trunk/librtmp/rtmp.c
>
> Modified: trunk/librtmp/rtmp.c
> ==============================================================================
> --- trunk/librtmp/rtmp.c	Tue Jun 29 03:31:17 2010	(r521)
> +++ trunk/librtmp/rtmp.c	Tue Jun 29 03:39:49 2010	(r522)
> @@ -714,28 +714,26 @@ int RTMP_SetupURL(RTMP *r, char *url)
>
>     if (!r->Link.tcUrl.av_len)
>       {
> -	  r->Link.tcUrl.av_val = url;
> -	  if (r->Link.app.av_len) {
> -	    if (r->Link.app.av_val<  url + len)
> -		  {
> -		    /* if app is part of original url, just use it */
> -	        r->Link.tcUrl.av_len = r->Link.app.av_len + (r->Link.app.av_val - url);
> -		  }
> -		else
> -		  {
> -		    len = r->Link.hostname.av_len + r->Link.app.av_len +
> -			  sizeof("rtmpte://65535/");
> -			r->Link.tcUrl.av_val = malloc(len);
> -			r->Link.tcUrl.av_len = snprintf(r->Link.tcUrl.av_val, len,
> -			  "%s://%.*s:%d/%.*s",
> -	  	      RTMPProtocolStringsLower[r->Link.protocol],
> -			  r->Link.hostname.av_len, r->Link.hostname.av_val,
> -			  r->Link.port,
> -			  r->Link.app.av_len, r->Link.app.av_val);
> -			r->Link.lFlags |= RTMP_LF_FTCU;
> -		  }
> -	  } else {
> -	    r->Link.tcUrl.av_len = strlen(url);
> +      r->Link.tcUrl.av_val = url;
> +      if (r->Link.app.av_len) {
> +        if (r->Link.app.av_val<  url + len)
> +    	  {
> +    	    /* if app is part of original url, just use it */
> +            r->Link.tcUrl.av_len = r->Link.app.av_len + (r->Link.app.av_val - url);
> +    	  }
> +    	else
> +    	  {
> +    	    len = r->Link.hostname.av_len + r->Link.app.av_len +
> +    		  sizeof("rtmpte://:65535/");
> +	    r->Link.tcUrl.av_val = malloc(len);
> +	    r->Link.tcUrl.av_len = snprintf(r->Link.tcUrl.av_val, len,
> +		"%s://%.*s:%d/%.*s",
> +		RTMPProtocolStringsLower[r->Link.protocol],
> +		r->Link.hostname.av_len, r->Link.hostname.av_val,
> +		r->Link.port,
> +		r->Link.app.av_len, r->Link.app.av_val);
> +	    r->Link.lFlags |= RTMP_LF_FTCU;
> +	    tcUrl.av_len = strlen(url);
>   	  }
>   	}
>
> @@ -3449,10 +3447,10 @@ RTMP_Close(RTMP *r)
>
>     if (r->Link.lFlags&  RTMP_LF_FTCU)
>       {
> -	  free(r->Link.tcUrl.av_val);
> -	  r->Link.tcUrl.av_val = NULL;
> -	  r->Link.lFlags ^= RTMP_LF_FTCU;
> -	}
> +      free(r->Link.tcUrl.av_val);
> +      r->Link.tcUrl.av_val = NULL;
> +      r->Link.lFlags ^= RTMP_LF_FTCU;
> +    }
>
>   #ifdef CRYPTO
>     if (r->Link.dh)
> _______________________________________________
> rtmpdump mailing list
> rtmpdump at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/rtmpdump



More information about the rtmpdump mailing list