Skip to content

Commit 34e2eb0

Browse files
committed
添加AudioRecordUtil中的buffer非空判断
Change-Id: I8f9dc468580698e3c8a2a924b9072f6d57313edf
1 parent 07bb0db commit 34e2eb0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdk/video-link-android/src/main/java/com/tencent/iot/video/link/util/audio/AudioRecordUtil.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@ public void run() {
227227
}
228228
if (AudioRecord.ERROR_INVALID_OPERATION != read) {
229229
//获取到的pcm数据就是buffer了
230-
pcmEncoder.encodeData(buffer);
230+
if (buffer != null) {
231+
pcmEncoder.encodeData(buffer);
232+
}
231233
}
232234
}
233235
}

0 commit comments

Comments
 (0)