Explorar el Código

merge Bug-Hunt-III into main

main
Jan hace 1 mes
padre
commit
405f697e35
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. +5
    -1
      aoiprxkit/rtp.go

+ 5
- 1
aoiprxkit/rtp.go Ver fichero

@@ -63,6 +63,10 @@ func ParseRTPPacket(buf []byte) (RTPPacket, error) {
}
payload = payload[:len(payload)-padLen]
}
p.Payload = payload
// ALIASING FIX: copy payload bytes before returning. The caller reuses
// the receive buffer on every ReadFromUDP call, so any RTPPacket stored
// in the jitter buffer for later delivery would have its Payload slice
// silently overwritten by the next incoming packet.
p.Payload = append([]byte(nil), payload...)
return p, nil
}

Cargando…
Cancelar
Guardar