diff --git a/rtp/src/main/kotlin/org/jitsi/rtp/rtp/RtpPacket.kt b/rtp/src/main/kotlin/org/jitsi/rtp/rtp/RtpPacket.kt index 50d19bd070..a3ed593b65 100644 --- a/rtp/src/main/kotlin/org/jitsi/rtp/rtp/RtpPacket.kt +++ b/rtp/src/main/kotlin/org/jitsi/rtp/rtp/RtpPacket.kt @@ -410,15 +410,14 @@ open class RtpPacket( ).also { if (pendingHeaderExtensions != null) it.pendingHeaderExtensions = ArrayList(pendingHeaderExtensions) } } - override fun toString(): String = with(StringBuilder()) { - append("RtpPacket: ") + override fun toString(): String = buildString { + append("${this@RtpPacket::class.java.simpleName}: ") append("PT=$payloadType") append(", Ssrc=$ssrc") append(", SeqNum=$sequenceNumber") append(", M=$isMarked") append(", X=$hasEncodedExtensions") append(", Ts=$timestamp") - toString() } /**