[rtmpdump] branch master updated. 8880d14 Unexpected BW Response Fix

gitolite gil at avcodec.org
Tue Aug 2 21:17:27 CEST 2011


The branch, master has been updated
       via  8880d1456b282ee79979adbe7b6a6eb8ad371081 (commit)
      from  f1abda046ca5a3f1efa63033c542e686b43dbcf3 (commit)


- Log -----------------------------------------------------------------
commit 8880d1456b282ee79979adbe7b6a6eb8ad371081
Author:     Chris Larsen <clarsen at euphoriaaudio.com>
AuthorDate: Tue Aug 2 12:33:44 2011 -0400
Commit:     Howard Chu <hyc at highlandsun.com>
CommitDate: Tue Aug 2 12:17:03 2011 -0700

    Unexpected BW Response Fix
    
    Bug: SendCheckBWResult sends an invalid bw response due to casting issues
    from a double to an int.

diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
index df2cb27..5311a8a 100644
--- a/librtmp/rtmp.c
+++ b/librtmp/rtmp.c
@@ -2339,7 +2339,7 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize)
 {
   AMFObject obj;
   AVal method;
-  int txn;
+  double txn;
   int ret = 0, nRes;
   if (body[0] != 0x02)		/* make sure it is a string method name we start with */
     {
@@ -2357,7 +2357,7 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize)
 
   AMF_Dump(&obj);
   AMFProp_GetString(AMF_GetProp(&obj, NULL, 0), &method);
-  txn = (int)AMFProp_GetNumber(AMF_GetProp(&obj, NULL, 1));
+  txn = AMFProp_GetNumber(AMF_GetProp(&obj, NULL, 1));
   RTMP_Log(RTMP_LOGDEBUG, "%s, server invoking <%s>", __FUNCTION__, method.av_val);
 
   if (AVMATCH(&method, &av__result))
@@ -2366,7 +2366,7 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize)
       int i;
 
       for (i=0; i<r->m_numCalls; i++) {
-  	if (r->m_methodCalls[i].num == txn) {
+	if (r->m_methodCalls[i].num == (int)txn) {
 	  methodInvoked = r->m_methodCalls[i].name;
 	  AV_erase(r->m_methodCalls, &r->m_numCalls, i, FALSE);
 	  break;

-----------------------------------------------------------------------

Summary of changes:
 librtmp/rtmp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


hooks/post-receive
-- 



More information about the rtmpdump mailing list