mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 19:42:45 +00:00
Free audio packets back to the packet pool after decoding.
This commit is contained in:
parent
4eaf68ae58
commit
aa4e07ea2f
@ -170,8 +170,9 @@ public class NvAudioStream {
|
||||
return;
|
||||
}
|
||||
|
||||
// !!! We no longer own the data buffer at this point !!!
|
||||
depacketizer.decodeInputData(packet);
|
||||
|
||||
pool.free(packet.getBackingBuffer());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -34,6 +34,11 @@ public class AvRtpPacket {
|
||||
return seqNum;
|
||||
}
|
||||
|
||||
public byte[] getBackingBuffer()
|
||||
{
|
||||
return buffer.data;
|
||||
}
|
||||
|
||||
public AvByteBufferDescriptor getNewPayloadDescriptor()
|
||||
{
|
||||
return new AvByteBufferDescriptor(buffer.data, buffer.offset+12, buffer.length-12);
|
||||
|
Loading…
x
Reference in New Issue
Block a user