mirror of https://bitbucket.org/ausocean/av.git
Remove superfluous call to handlePacket() from connectStream().
This commit is contained in:
parent
b388f5374f
commit
7bb9fcc2c7
10
rtmp/rtmp.go
10
rtmp/rtmp.go
|
@ -203,11 +203,10 @@ func connectStream(s *Session) error {
|
||||||
case RTMP_PACKET_TYPE_AUDIO, RTMP_PACKET_TYPE_VIDEO, RTMP_PACKET_TYPE_INFO:
|
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)
|
s.log(WarnLevel, pkg+"got packet before play; ignoring", "type", pkt.packetType)
|
||||||
default:
|
default:
|
||||||
handlePacket(s, &pkt) // ignore errors
|
err = handlePacket(s, &pkt)
|
||||||
}
|
if err != nil {
|
||||||
err = handlePacket(s, &pkt)
|
break
|
||||||
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
|
// NB: cases have been commented out that are not currently used by AusOcean
|
||||||
func handlePacket(s *Session, pkt *packet) error {
|
func handlePacket(s *Session, pkt *packet) error {
|
||||||
switch pkt.packetType {
|
switch pkt.packetType {
|
||||||
|
|
||||||
case RTMP_PACKET_TYPE_CHUNK_SIZE:
|
case RTMP_PACKET_TYPE_CHUNK_SIZE:
|
||||||
if pkt.bodySize >= 4 {
|
if pkt.bodySize >= 4 {
|
||||||
s.inChunkSize = int32(C_AMF_DecodeInt32(pkt.body[:4]))
|
s.inChunkSize = int32(C_AMF_DecodeInt32(pkt.body[:4]))
|
||||||
|
|
Loading…
Reference in New Issue