Skip to content

Commit

Permalink
对pcmEncoder.encodeData做判空保护
Browse files Browse the repository at this point in the history
Change-Id: Ifd2c66b860bcc4c66e9f140cd9cecaf2f78822e4
  • Loading branch information
SundoggyNew committed Jun 25, 2023
1 parent c081c05 commit 08589ab
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public void run() {
}
if (AudioRecord.ERROR_INVALID_OPERATION != read) {
//获取到的pcm数据就是buffer了
if (buffer != null) {
if (buffer != null && pcmEncoder != null) {
pcmEncoder.encodeData(buffer);
}
}
Expand Down

0 comments on commit 08589ab

Please sign in to comment.