winlin

fix bug of send rtmp message

@@ -404,7 +404,7 @@ int SrsProtocol::send_message(SrsMessage* msg) @@ -404,7 +404,7 @@ int SrsProtocol::send_message(SrsMessage* msg)
404 404
405 // sendout header and payload by writev. 405 // sendout header and payload by writev.
406 // decrease the sys invoke count to get higher performance. 406 // decrease the sys invoke count to get higher performance.
407 - int payload_size = msg->size - ((char*)msg->payload - p); 407 + int payload_size = msg->size - (p - (char*)msg->payload);
408 if (payload_size > out_chunk_size) { 408 if (payload_size > out_chunk_size) {
409 payload_size = out_chunk_size; 409 payload_size = out_chunk_size;
410 } 410 }