胡斌

ignore "checkBandwidth" and "_checkbw" command,don't treat them as republish

... ... @@ -990,6 +990,9 @@ int SrsRtmpConn::handle_publish_message(SrsSource* source, SrsCommonMessage* msg
srs_error("fmle decode unpublish message failed. ret=%d", ret);
return ret;
}
if(NULL == pkt){
return ret;//ignored packets,don't do republish
}
SrsAutoFree(SrsPacket, pkt);
// for flash, any packet is republish.
... ...
... ... @@ -838,7 +838,11 @@ int SrsProtocol::do_decode_message(SrsMessageHeader& header, SrsStream* stream,
srs_info("decode the AMF0/AMF3 closeStream message.");
*ppacket = packet = new SrsCloseStreamPacket();
return packet->decode(stream);
} else if (header.is_amf0_command() || header.is_amf3_command()) {
}else if (command == RTMP_AMF0_COMMAND_CHECKBANDWIDTH || command == RTMP_AMF0_COMMAND_CHECKBW) {
//todo: process check bandwidth command,now drop it
return ret;
}
else if (header.is_amf0_command() || header.is_amf3_command()) {
srs_info("decode the AMF0/AMF3 call message.");
*ppacket = packet = new SrsCallPacket();
return packet->decode(stream);
... ...
... ... @@ -91,6 +91,8 @@ class IMergeReadHandler;
#define RTMP_AMF0_COMMAND_PUBLISH "publish"
#define RTMP_AMF0_DATA_SAMPLE_ACCESS "|RtmpSampleAccess"
#define RTMP_AMF0_COMMAND_CHECKBANDWIDTH "checkBandwidth"
#define RTMP_AMF0_COMMAND_CHECKBW "_checkbw"
/**
* the signature for packets to client.
*/
... ...