diff --git a/trunk/src/rtmp/srs_protocol_stack.cpp b/trunk/src/rtmp/srs_protocol_stack.cpp index f065401e9f..a987c5a01f 100644 --- a/trunk/src/rtmp/srs_protocol_stack.cpp +++ b/trunk/src/rtmp/srs_protocol_stack.cpp @@ -564,21 +564,21 @@ int SrsProtocol::do_send_message(SrsMessage* msg) srs_assert(nbh > 0); // header iov - iov[0].iov_base = header; - iov[0].iov_len = nbh; + out_iov[0].iov_base = header; + out_iov[0].iov_len = nbh; // payload iov int payload_size = pend - p; if (payload_size > out_chunk_size) { payload_size = out_chunk_size; } - iov[1].iov_base = p; - iov[1].iov_len = payload_size; + out_iov[1].iov_base = p; + out_iov[1].iov_len = payload_size; // send by writev // sendout header and payload by writev. // decrease the sys invoke count to get higher performance. - if ((ret = skt->writev(iov, 2, NULL)) != ERROR_SUCCESS) { + if ((ret = skt->writev(out_iov, 2, NULL)) != ERROR_SUCCESS) { srs_error("send with writev failed. ret=%d", ret); return ret; } @@ -592,7 +592,7 @@ int SrsProtocol::do_send_message(SrsMessage* msg) void SrsProtocol::generate_chunk_header(SrsMessageHeader* mh, bool c0, int* pnbh, char** ph) { - char* cache = out_c0_cache; + char* cache = out_c0c3_cache; // to directly set the field. char* pp = NULL; diff --git a/trunk/src/rtmp/srs_protocol_stack.hpp b/trunk/src/rtmp/srs_protocol_stack.hpp index 949b9508a4..071f5168f7 100644 --- a/trunk/src/rtmp/srs_protocol_stack.hpp +++ b/trunk/src/rtmp/srs_protocol_stack.hpp @@ -215,11 +215,11 @@ class SrsProtocol * used for type0, 11bytes(or 15bytes with extended timestamp) header. * or for type3, 1bytes(or 5bytes with extended timestamp) header. */ - char out_c0_cache[SRS_CONSTS_RTMP_MAX_FMT0_HEADER_SIZE]; + char out_c0c3_cache[SRS_CONSTS_RTMP_MAX_FMT0_HEADER_SIZE]; /** * output iovec cache. */ - iovec iov[2]; + iovec out_iov[2]; /** * output chunk size, default to 128, set by config. */