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

Commit e0a7c8d9 authored by En-Shuo Hsu's avatar En-Shuo Hsu Committed by Automerger Merge Worker
Browse files

Merge "floss: metrics: Fix pkt loss metrics" am: 539f2700 am: 1fe81f03

parents d539bc29 1fe81f03
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -493,7 +493,7 @@ struct tBTM_MSBC_INFO {


  const uint8_t* find_msbc_pkt_head() {
  const uint8_t* find_msbc_pkt_head() {
    if (read_corrupted) {
    if (read_corrupted) {
      LOG_WARN("Skip corrupted mSBC packets");
      LOG_DEBUG("Skip corrupted mSBC packets");
      read_corrupted = false;
      read_corrupted = false;
      return nullptr;
      return nullptr;
    }
    }
@@ -597,7 +597,7 @@ bool fill_plc_stats(int* num_decoded_frames, double* packet_loss_ratio) {


  int decoded_frames = msbc_info->plc->get_num_decoded_frames();
  int decoded_frames = msbc_info->plc->get_num_decoded_frames();
  int lost_frames = msbc_info->plc->get_num_lost_frames();
  int lost_frames = msbc_info->plc->get_num_lost_frames();
  if (decoded_frames <= 0 || lost_frames <= 0 || lost_frames > decoded_frames)
  if (decoded_frames <= 0 || lost_frames < 0 || lost_frames > decoded_frames)
    return false;
    return false;


  *num_decoded_frames = decoded_frames;
  *num_decoded_frames = decoded_frames;