Avoids crash in WebRtcAudioTrack.initPlayout (part II)

I had reversed a condition in https://codereview.webrtc.org/2315363004/ and we always failed. Fixing that here.

TBR=magjed

Review URL: https://codereview.webrtc.org/2313393004 .

Cr-Commit-Position: refs/heads/master@{#14136}
This commit is contained in:
henrika 2016-09-08 16:11:36 +02:00
parent ae9f2bdcef
commit 0f8ea0da53

View File

@ -189,7 +189,7 @@ public class WebRtcAudioTrack {
// to the total buffer size |minBufferSizeInBytes|. But, we have seen
// reports of "getMinBufferSize(): error querying hardware". Hence, it
// can happen that |minBufferSizeInBytes| contains an invalid value.
if (byteBuffer.capacity() < minBufferSizeInBytes) {
if (minBufferSizeInBytes < byteBuffer.capacity()) {
Logging.e(TAG, "AudioTrack.getMinBufferSize returns an invalid value.");
return false;
}