Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e63ee89 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "audio flinger: add check in getInputBufferSize()"

parents 8f94fb41 cdf924a3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1161,7 +1161,9 @@ size_t AudioFlinger::getInputBufferSize(uint32_t sampleRate, audio_format_t form
    if (ret != NO_ERROR) {
        return 0;
    }
    if (!audio_is_valid_format(format) || !audio_is_linear_pcm(format)) {
    if ((sampleRate == 0) ||
            !audio_is_valid_format(format) || !audio_is_linear_pcm(format) ||
            !audio_is_input_channel(channelMask)) {
        return 0;
    }