mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-21 12:03:02 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// !!! We no longer own the data buffer at this point !!!
|
|
||||||
depacketizer.decodeInputData(packet);
|
depacketizer.decodeInputData(packet);
|
||||||
|
|
||||||
|
pool.free(packet.getBackingBuffer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -34,6 +34,11 @@ public class AvRtpPacket {
|
|||||||
return seqNum;
|
return seqNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public byte[] getBackingBuffer()
|
||||||
|
{
|
||||||
|
return buffer.data;
|
||||||
|
}
|
||||||
|
|
||||||
public AvByteBufferDescriptor getNewPayloadDescriptor()
|
public AvByteBufferDescriptor getNewPayloadDescriptor()
|
||||||
{
|
{
|
||||||
return new AvByteBufferDescriptor(buffer.data, buffer.offset+12, buffer.length-12);
|
return new AvByteBufferDescriptor(buffer.data, buffer.offset+12, buffer.length-12);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user