<div>this is the data send to RTMPE server;</div><div><br></div><div>0x00F3EDEF 06 00 00 00 00 80 00 03 02 f5 61 55 a5 b6 69 d1 7e 86 .....€...?aU??i?~?</div><div>0x00F3EE01 25 e6 d2 b5 d9 4c 94 df 93 ba 69 b0 61 e0 e6 ef 13 89 %????L????i?a???.?</div>
<div>0x00F3EE13 61 0a 30 a4 3f 45 8a ce 34 1b 43 55 83 00 43 4d d3 4d a.0??E??<a href="http://4.CU?.CM?M">4.CU?.CM?M</a></div><div>0x00F3EE25 39 55 1b a9 64 40 ad ae 50 73 e2 31 a4 db 1c 98 58 05 9U.?d@??Ps?1??.?X.</div>
<div>0x00F3EE37 f3 d5 c9 23 9f 44 31 30 1e b4 ba cf db a0 6e 08 d4 15 ???#?D10.?????n.?.</div><div>0x00F3EE49 f2 07 7c 6d f0 6e 09 20 c2 92 71 14 d2 bb 0e bc b4 ab ?.|m?n. ??q.??.???</div><div>0x00F3EE5B 9f 60 b0 9a b9 82 a6 a9 4a 62 7f c7 f5 bf c8 6a 57 fc ?`??????Jb.????jW?</div>
<div>0x00F3EE6D c9 21 6b 9d 64 27 47 69 0f 72 cd 00 00 00 00 00 00 00 ?!k?d'Gi.r?.......</div><div class="gmail_extra"><br><br><div class="gmail_quote">2012/11/27 Xspeed <span dir="ltr"><<a href="mailto:xspeed1989@gmail.com" target="_blank">xspeed1989@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>static int</div><div>WriteN(RTMP *r, const char *buffer, int n)</div><div>{</div><div> const char *ptr = buffer;</div>
<div>#ifdef CRYPTO</div><div> char *encrypted = 0;</div><div> char buf[RTMP_BUFFER_CACHE_SIZE];</div>
<div><br></div><div> if (r->Link.rc4keyOut)</div><div> {</div><div> if (n > sizeof(buf))</div><div><span style="white-space:pre-wrap"> </span>encrypted = (char *)malloc(n);</div><div> else</div><div>
<span style="white-space:pre-wrap"> </span>encrypted = (char *)buf;</div><div> ptr = encrypted;</div><div> RC4_encrypt2(r->Link.rc4keyOut, n, buffer, ptr);</div><div> }</div><div>#endif</div><div><br></div>
<div> while (n > 0)</div><div> {</div><div> int nBytes;</div><div><br></div><div> if (r->Link.protocol & RTMP_FEATURE_HTTP)</div><div> nBytes = HTTP_Post(r, RTMPT_SEND, ptr, n);</div><div> else</div>
<div> nBytes = RTMPSockBuf_Send(&r->m_sb, ptr, n);</div><div> /*RTMP_Log(RTMP_LOGDEBUG, "%s: %d\n", __FUNCTION__, nBytes); */</div><div><br></div><div> if (nBytes < 0)</div><div><span style="white-space:pre-wrap"> </span>{</div>
<div><span style="white-space:pre-wrap"> </span> int sockerr = GetSockError();</div><div><span style="white-space:pre-wrap"> </span> RTMP_Log(RTMP_LOGERROR, "%s, RTMP send error %d (%d bytes)", __FUNCTION__,</div>
<div><span style="white-space:pre-wrap"> </span> sockerr, n);</div><div><br></div><div><span style="white-space:pre-wrap"> </span> if (sockerr == EINTR && !RTMP_ctrlC)</div><div><span style="white-space:pre-wrap"> </span> continue;</div>
<div><br></div><div><span style="white-space:pre-wrap"> </span> RTMP_Close(r);</div><div><span style="white-space:pre-wrap"> </span> n = 1;</div><div><span style="white-space:pre-wrap"> </span> break;</div>
<div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div> if (nBytes == 0)</div><div><span style="white-space:pre-wrap"> </span>break;</div><div><br></div><div> n -= nBytes;</div><div> ptr += nBytes;</div>
<div> }</div><div><br></div><div>#ifdef CRYPTO</div><div> if (encrypted && encrypted != buf)</div><div> free(encrypted);</div><div>#endif</div><div><br></div><div> return n == 0;</div><div>}</div></div><div>
<br></div><div>I think you need to initialize your key when you call the following encryption function, but you didn't, which leads to my error.</div><div>RC4_encrypt2(r->Link.rc4keyOut, n, buffer, ptr);<br></div>
<div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><div class="gmail_quote">2012/11/27 Xspeed <span dir="ltr"><<a href="mailto:xspeed1989@gmail.com" target="_blank">xspeed1989@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="gmail_extra">Actually the program is not using the library I compiled, but the one that exists in system<div><br><br><div class="gmail_quote">2012/11/27 Steven Penny <span dir="ltr"><<a href="mailto:svnpenn@gmail.com" target="_blank">svnpenn@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>Ok I'll bite. You say only success on Ubuntu, yet you have shown a working<br>
command / output from working command. I will be skeptical until I see this.</div></blockquote></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>