uint8_t *ptr;
ssize_t received;
size_t processed = 0;
+#ifdef __TIZEN_BT__
+ static int decode_error_count = 0;
+ const int max_decode_error_count = 100;
+#endif
pa_assert(u);
pa_assert(u->source);
if (processed != (size_t) received) {
pa_log_error("Decoding error");
+#ifdef __TIZEN_BT__
+ if (++decode_error_count < max_decode_error_count) {
+ pa_log_warn("Continuous decode error count [%3d/%3d]", decode_error_count, max_decode_error_count);
+ pa_memblock_unref(memchunk.memblock);
+ return 0;
+ }
+ pa_log_error("Continuous decode error count [%3d/%3d]", decode_error_count, max_decode_error_count);
+ decode_error_count = 0;
+#endif
pa_memblock_unref(memchunk.memblock);
return -1;
}
+#ifdef __TIZEN_BT__
+ decode_error_count = 0;
+#endif
u->read_index += (uint64_t) memchunk.length;
pa_smoother_put(u->read_smoother, tstamp, pa_bytes_to_usec(u->read_index, &u->decoder_sample_spec));