Remove superfluous call to handlePacket() from connectStream().

This commit is contained in:
scruzin 2019-01-11 00:10:29 +10:30
parent b388f5374f
commit 7bb9fcc2c7
1 changed files with 4 additions and 6 deletions

View File

@ -203,11 +203,10 @@ func connectStream(s *Session) error {
case RTMP_PACKET_TYPE_AUDIO, RTMP_PACKET_TYPE_VIDEO, RTMP_PACKET_TYPE_INFO:
s.log(WarnLevel, pkg+"got packet before play; ignoring", "type", pkt.packetType)
default:
handlePacket(s, &pkt) // ignore errors
}
err = handlePacket(s, &pkt)
if err != nil {
break
err = handlePacket(s, &pkt)
if err != nil {
break
}
}
}
@ -221,7 +220,6 @@ func connectStream(s *Session) error {
// NB: cases have been commented out that are not currently used by AusOcean
func handlePacket(s *Session, pkt *packet) error {
switch pkt.packetType {
case RTMP_PACKET_TYPE_CHUNK_SIZE:
if pkt.bodySize >= 4 {
s.inChunkSize = int32(C_AMF_DecodeInt32(pkt.body[:4]))