This commit is contained in:
philippe44
2019-08-18 00:02:00 -07:00
parent e9731ee232
commit 82bf8c507e
2 changed files with 7 additions and 5 deletions

View File

@@ -72,7 +72,7 @@ static log_level *loglevel = &raop_loglevel;
static log_level *loglevel = &raop_loglevel;
//#define __RTP_STORE
// default buffer size
#define BUFFER_FRAMES ( (120 * 44100) / (352 * 100) )
#define MAX_PACKET 1408
@@ -499,6 +499,7 @@ static void buffer_push_packet(rtp_t *ctx) {
/*
if (now > playtime + ctx->frame_duration) {
//LOG_INFO("[%p]: discarded frame (W:%hu R:%hu)", ctx, ctx->ab_write, ctx->ab_read);
} else if (curframe->ready) {
ctx->callback((const u8_t*) curframe->data, curframe->len);
curframe->ready = 0;
} else if (now >= playtime) {
@@ -508,6 +509,7 @@ static void buffer_push_packet(rtp_t *ctx) {
} else break;
*/
if (curframe->ready) {
ctx->callback((const u8_t*) curframe->data, curframe->len);
curframe->ready = 0;
} else if (now >= playtime) {