diff --git a/ngx_rtmp_handler.c b/ngx_rtmp_handler.c index abde383..ac78a6f 100644 --- a/ngx_rtmp_handler.c +++ b/ngx_rtmp_handler.c @@ -272,6 +272,13 @@ ngx_rtmp_recv(ngx_event_t *rev) b->last += n; s->in_bytes += n; + if (s->in_bytes >= 0xf0000000) { + ngx_log_debug0(NGX_LOG_DEBUG_RTMP, c->log, 0, + "resetting byte counter"); + s->in_bytes = 0; + s->in_last_ack = 0; + } + if (s->ack_size && s->in_bytes - s->in_last_ack >= s->ack_size) { s->in_last_ack = s->in_bytes;