Loading system/btif/src/btif_a2dp_sink.cc +8 −7 Original line number Diff line number Diff line Loading @@ -669,13 +669,6 @@ uint8_t btif_a2dp_sink_enqueue_buf(BT_HDR* p_pkt) { if (btif_a2dp_sink_cb.rx_flush) /* Flush enabled, do not enqueue */ return fixed_queue_length(btif_a2dp_sink_cb.rx_audio_queue); if (fixed_queue_length(btif_a2dp_sink_cb.rx_audio_queue) == MAX_INPUT_A2DP_FRAME_QUEUE_SZ) { uint8_t ret = fixed_queue_length(btif_a2dp_sink_cb.rx_audio_queue); osi_free(fixed_queue_try_dequeue(btif_a2dp_sink_cb.rx_audio_queue)); return ret; } BTIF_TRACE_VERBOSE("%s +", __func__); /* Allocate and queue this buffer */ BT_HDR* p_msg = Loading @@ -684,6 +677,14 @@ uint8_t btif_a2dp_sink_enqueue_buf(BT_HDR* p_pkt) { p_msg->offset = 0; memcpy(p_msg->data, p_pkt->data + p_pkt->offset, p_pkt->len); fixed_queue_enqueue(btif_a2dp_sink_cb.rx_audio_queue, p_msg); if (fixed_queue_length(btif_a2dp_sink_cb.rx_audio_queue) == MAX_INPUT_A2DP_FRAME_QUEUE_SZ) { osi_free(fixed_queue_try_dequeue(btif_a2dp_sink_cb.rx_audio_queue)); uint8_t ret = fixed_queue_length(btif_a2dp_sink_cb.rx_audio_queue); return ret; } // Avoid other checks if alarm has already been initialized. if (btif_a2dp_sink_cb.decode_alarm == nullptr && fixed_queue_length(btif_a2dp_sink_cb.rx_audio_queue) >= Loading Loading
system/btif/src/btif_a2dp_sink.cc +8 −7 Original line number Diff line number Diff line Loading @@ -669,13 +669,6 @@ uint8_t btif_a2dp_sink_enqueue_buf(BT_HDR* p_pkt) { if (btif_a2dp_sink_cb.rx_flush) /* Flush enabled, do not enqueue */ return fixed_queue_length(btif_a2dp_sink_cb.rx_audio_queue); if (fixed_queue_length(btif_a2dp_sink_cb.rx_audio_queue) == MAX_INPUT_A2DP_FRAME_QUEUE_SZ) { uint8_t ret = fixed_queue_length(btif_a2dp_sink_cb.rx_audio_queue); osi_free(fixed_queue_try_dequeue(btif_a2dp_sink_cb.rx_audio_queue)); return ret; } BTIF_TRACE_VERBOSE("%s +", __func__); /* Allocate and queue this buffer */ BT_HDR* p_msg = Loading @@ -684,6 +677,14 @@ uint8_t btif_a2dp_sink_enqueue_buf(BT_HDR* p_pkt) { p_msg->offset = 0; memcpy(p_msg->data, p_pkt->data + p_pkt->offset, p_pkt->len); fixed_queue_enqueue(btif_a2dp_sink_cb.rx_audio_queue, p_msg); if (fixed_queue_length(btif_a2dp_sink_cb.rx_audio_queue) == MAX_INPUT_A2DP_FRAME_QUEUE_SZ) { osi_free(fixed_queue_try_dequeue(btif_a2dp_sink_cb.rx_audio_queue)); uint8_t ret = fixed_queue_length(btif_a2dp_sink_cb.rx_audio_queue); return ret; } // Avoid other checks if alarm has already been initialized. if (btif_a2dp_sink_cb.decode_alarm == nullptr && fixed_queue_length(btif_a2dp_sink_cb.rx_audio_queue) >= Loading