mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 11:03:01 +00:00
Release decoded data back to the buffer pool
This commit is contained in:
parent
34e87ca899
commit
ab61af0cb7
@ -150,6 +150,8 @@ public class NvAudioStream {
|
||||
}
|
||||
|
||||
track.write(samples.data, samples.offset, samples.length);
|
||||
|
||||
depacketizer.releaseBuffer(samples);
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
|
@ -32,7 +32,7 @@ public class AvAudioDepacketizer {
|
||||
{
|
||||
System.out.println("Received OOS audio data (expected "+(lastSequenceNumber + 1)+", got "+seq+")");
|
||||
|
||||
// Tell the decoder about this
|
||||
// Tell the decoder about this packet loss
|
||||
//OpusDecoder.decode(null, 0, 0, null);
|
||||
}
|
||||
|
||||
@ -54,6 +54,11 @@ public class AvAudioDepacketizer {
|
||||
}
|
||||
}
|
||||
|
||||
public void releaseBuffer(AvShortBufferDescriptor decodedData)
|
||||
{
|
||||
pool.free(decodedData.data);
|
||||
}
|
||||
|
||||
public AvShortBufferDescriptor getNextDecodedData() throws InterruptedException
|
||||
{
|
||||
return decodedUnits.take();
|
||||
|
Loading…
x
Reference in New Issue
Block a user