Commit 93a1b163 by xiongziliang

修复windows下http-flv的bug

parent 82e3907d
......@@ -597,6 +597,10 @@ void HttpSession::onSendMedia(const RtmpPacket::Ptr &pkt) {
sendRtmp(pkt->typeId, pkt->strBuf, modifiedStamp);
}
#if defined(_WIN32)
#pragma pack(push, 1)
#endif // defined(_WIN32)
class RtmpTagHeader {
public:
uint8_t type = 0;
......@@ -606,6 +610,10 @@ public:
uint8_t streamid[3] = {0}; /* Always 0. */
}PACKED;
#if defined(_WIN32)
#pragma pack(pop)
#endif // defined(_WIN32)
void HttpSession::sendRtmp(uint8_t ui8Type, const std::string& strBuf, uint32_t ui32TimeStamp) {
auto size = htonl(m_previousTagSize);
send((char *)&size,4);//send PreviousTagSize
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论