Merge "Skip frames out limit for non pcm" into main
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index c158de4..9a1fe1f 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -8553,9 +8553,11 @@
// from framesIn.
// This isn't strictly necessary but helps limit buffer resizing in
// RecordBufferConverter. TODO: remove when no longer needed.
- framesOut = min(framesOut,
- destinationFramesPossible(
- framesIn, mSampleRate, activeTrack->sampleRate()));
+ if (audio_is_linear_pcm(activeTrack->format())) {
+ framesOut = min(framesOut,
+ destinationFramesPossible(
+ framesIn, mSampleRate, activeTrack->sampleRate()));
+ }
if (activeTrack->isDirect()) {
// No RecordBufferConverter used for direct streams. Pass