mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 11:33:44 +02:00
fix fromRawData call for silent audio packet
This commit is contained in:
commit
52fdce4a44
3 changed files with 4 additions and 4 deletions
|
@ -110,10 +110,10 @@ int InboundAudioStream::parseData(NLPacket& packet) {
|
|||
packetReceivedUpdateTimingStats();
|
||||
|
||||
int networkSamples;
|
||||
|
||||
|
||||
// parse the info after the seq number and before the audio data (the stream properties)
|
||||
int propertyBytes = parseStreamProperties(packet.getType(),
|
||||
QByteArray::fromRawData(packet.getPayload(), packet.pos()),
|
||||
QByteArray::fromRawData(packet.getPayload(), packet.bytesLeftToRead()),
|
||||
networkSamples);
|
||||
packet.seek(packet.pos() + propertyBytes);
|
||||
|
||||
|
|
|
@ -496,7 +496,7 @@ unsigned int LimitedNodeList::broadcastToNodes(std::unique_ptr<NLPacket> packet,
|
|||
unsigned int n = 0;
|
||||
|
||||
eachNode([&](const SharedNodePointer& node){
|
||||
if (destinationNodeTypes.contains(node->getType())) {
|
||||
if (node->getActiveSocket() && destinationNodeTypes.contains(node->getType())) {
|
||||
writePacket(*packet, *node->getActiveSocket(), node->getConnectionSecret());
|
||||
++n;
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ void Packet::setPayloadSize(qint64 payloadSize) {
|
|||
|
||||
bool Packet::reset() {
|
||||
if (isWritable()) {
|
||||
setPayloadSize(0);
|
||||
_payloadSize = 0;
|
||||
}
|
||||
|
||||
return QIODevice::reset();
|
||||
|
|
Loading…
Reference in a new issue