fix publish type

This commit is contained in:
yangkun 2021-07-09 14:58:58 +08:00
parent 9217a5dbcd
commit 03f6f4c4c0

View File

@ -173,9 +173,10 @@ inline void RtmpPusher::send_createStream() {
}); });
} }
#define RTMP_STREAM_LIVE "live"
inline void RtmpPusher::send_publish() { inline void RtmpPusher::send_publish() {
AMFEncoder enc; AMFEncoder enc;
enc << "publish" << ++_send_req_id << nullptr << _stream_id << _app; enc << "publish" << ++_send_req_id << nullptr << _stream_id << RTMP_STREAM_LIVE;
sendRequest(MSG_CMD, enc.data()); sendRequest(MSG_CMD, enc.data());
addOnStatusCB([this](AMFValue &val) { addOnStatusCB([this](AMFValue &val) {