mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-29 14:45:55 +08:00
修复windows下http-flv的bug
This commit is contained in:
parent
82e3907dfa
commit
93a1b16305
@ -597,6 +597,10 @@ void HttpSession::onSendMedia(const RtmpPacket::Ptr &pkt) {
|
|||||||
sendRtmp(pkt->typeId, pkt->strBuf, modifiedStamp);
|
sendRtmp(pkt->typeId, pkt->strBuf, modifiedStamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#pragma pack(push, 1)
|
||||||
|
#endif // defined(_WIN32)
|
||||||
|
|
||||||
class RtmpTagHeader {
|
class RtmpTagHeader {
|
||||||
public:
|
public:
|
||||||
uint8_t type = 0;
|
uint8_t type = 0;
|
||||||
@ -606,6 +610,10 @@ public:
|
|||||||
uint8_t streamid[3] = {0}; /* Always 0. */
|
uint8_t streamid[3] = {0}; /* Always 0. */
|
||||||
}PACKED;
|
}PACKED;
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#pragma pack(pop)
|
||||||
|
#endif // defined(_WIN32)
|
||||||
|
|
||||||
void HttpSession::sendRtmp(uint8_t ui8Type, const std::string& strBuf, uint32_t ui32TimeStamp) {
|
void HttpSession::sendRtmp(uint8_t ui8Type, const std::string& strBuf, uint32_t ui32TimeStamp) {
|
||||||
auto size = htonl(m_previousTagSize);
|
auto size = htonl(m_previousTagSize);
|
||||||
send((char *)&size,4);//send PreviousTagSize
|
send((char *)&size,4);//send PreviousTagSize
|
||||||
|
Loading…
Reference in New Issue
Block a user