mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:21:16 +02:00
fix seeks in InboundAudioStream
This commit is contained in:
parent
35c8a60f3b
commit
39272652e5
1 changed files with 3 additions and 3 deletions
|
@ -112,9 +112,10 @@ int InboundAudioStream::parseData(NLPacket& packet) {
|
||||||
int networkSamples;
|
int networkSamples;
|
||||||
|
|
||||||
// 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 prePropertyPosition = packet.pos();
|
||||||
int propertyBytes = parseStreamProperties(packet.getType(), packet.read(packet.bytesLeftToRead()), networkSamples);
|
int propertyBytes = parseStreamProperties(packet.getType(), packet.read(packet.bytesLeftToRead()), networkSamples);
|
||||||
packet.seek(packet.pos() + propertyBytes);
|
packet.seek(prePropertyPosition + propertyBytes);
|
||||||
|
|
||||||
// handle this packet based on its arrival status.
|
// handle this packet based on its arrival status.
|
||||||
switch (arrivalInfo._status) {
|
switch (arrivalInfo._status) {
|
||||||
case SequenceNumberStats::Early: {
|
case SequenceNumberStats::Early: {
|
||||||
|
@ -132,7 +133,6 @@ int InboundAudioStream::parseData(NLPacket& packet) {
|
||||||
writeDroppableSilentSamples(networkSamples);
|
writeDroppableSilentSamples(networkSamples);
|
||||||
} else {
|
} else {
|
||||||
int audioBytes = parseAudioData(packet.getType(), packet.read(packet.bytesLeftToRead()), networkSamples);
|
int audioBytes = parseAudioData(packet.getType(), packet.read(packet.bytesLeftToRead()), networkSamples);
|
||||||
packet.seek(packet.pos() + audioBytes);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue