mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 22:50:54 +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
|
@ -113,7 +113,7 @@ int InboundAudioStream::parseData(NLPacket& packet) {
|
||||||
|
|
||||||
// parse the info after the seq number and before the audio data (the stream properties)
|
// parse the info after the seq number and before the audio data (the stream properties)
|
||||||
int propertyBytes = parseStreamProperties(packet.getType(),
|
int propertyBytes = parseStreamProperties(packet.getType(),
|
||||||
QByteArray::fromRawData(packet.getPayload(), packet.pos()),
|
QByteArray::fromRawData(packet.getPayload(), packet.bytesLeftToRead()),
|
||||||
networkSamples);
|
networkSamples);
|
||||||
packet.seek(packet.pos() + propertyBytes);
|
packet.seek(packet.pos() + propertyBytes);
|
||||||
|
|
||||||
|
|
|
@ -496,7 +496,7 @@ unsigned int LimitedNodeList::broadcastToNodes(std::unique_ptr<NLPacket> packet,
|
||||||
unsigned int n = 0;
|
unsigned int n = 0;
|
||||||
|
|
||||||
eachNode([&](const SharedNodePointer& node){
|
eachNode([&](const SharedNodePointer& node){
|
||||||
if (destinationNodeTypes.contains(node->getType())) {
|
if (node->getActiveSocket() && destinationNodeTypes.contains(node->getType())) {
|
||||||
writePacket(*packet, *node->getActiveSocket(), node->getConnectionSecret());
|
writePacket(*packet, *node->getActiveSocket(), node->getConnectionSecret());
|
||||||
++n;
|
++n;
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ void Packet::setPayloadSize(qint64 payloadSize) {
|
||||||
|
|
||||||
bool Packet::reset() {
|
bool Packet::reset() {
|
||||||
if (isWritable()) {
|
if (isWritable()) {
|
||||||
setPayloadSize(0);
|
_payloadSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return QIODevice::reset();
|
return QIODevice::reset();
|
||||||
|
|
Loading…
Reference in a new issue