cvsd_plc: fix bad frame detection for packets comming over USB

This commit is contained in:
Milanka Ringwald 2018-12-19 23:29:01 +01:00
parent d1550f906a
commit 4e59fe7d8d

View File

@ -450,7 +450,7 @@ static int zero_frame(BTSTACK_CVSD_PLC_SAMPLE_FORMAT * frame, uint16_t size){
// more than half the samples are the same -> bad frame
static int bad_frame(btstack_cvsd_plc_state_t *plc_state, BTSTACK_CVSD_PLC_SAMPLE_FORMAT * frame, uint16_t size){
return count_equal_samples(frame, size) > size / 2;
return count_equal_samples(frame, size) >= (size / 2);
}