revert a change that used assert in a way that fails with NDEBUG

(pointed out by @heweishing, thanks)
This commit is contained in:
fduncanh
2022-08-28 01:51:10 -04:00
parent d7648e8d73
commit 6e8491a30a

View File

@@ -521,7 +521,8 @@ raop_rtp_thread_udp(void *arg)
uint32_t timestamp = byteutils_get_int_be(resent_packet, 4);
uint64_t rtp_time = rtp64_time(raop_rtp, &timestamp);
logger_log(raop_rtp->logger, LOGGER_DEBUG, "raop_rtp resent audio packet: seqnum=%u", seqnum);
assert(raop_buffer_enqueue(raop_rtp->buffer, resent_packet, resent_packetlen, rtp_time, 1) >= 0);
int result = raop_buffer_enqueue(raop_rtp->buffer, resent_packet, resent_packetlen, rtp_time, 1);
assert(result >= 0);
} else {
/* type_c = 0x56 packets with length 8 have been reported */
char *str = utils_data_to_string(packet, packetlen, 16);
@@ -661,7 +662,8 @@ raop_rtp_thread_udp(void *arg)
seqnum2 = seqnum1;
seqnum1 = seqnum;
}
assert(raop_buffer_enqueue(raop_rtp->buffer, packet, packetlen, rtp_time, 1) >= 0);
int result = raop_buffer_enqueue(raop_rtp->buffer, packet, packetlen, rtp_time, 1);
assert(result >= 0);
// Render continuous buffer entries
void *payload = NULL;
unsigned int payload_size;