mirror of
https://github.com/arut/nginx-rtmp-module.git
synced 2025-08-06 15:00:18 +08:00
added timestamp cut in recorder to prevent negative (big unsigned) timestamps
This commit is contained in:
@ -892,6 +892,13 @@ ngx_rtmp_record_write_frame(ngx_rtmp_session_t *s,
|
||||
|
||||
timestamp = h->timestamp - rctx->epoch;
|
||||
|
||||
if ((int32_t) timestamp < 0) {
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
|
||||
"record: %V cut timestamp=%D", &rracf->id, timestamp);
|
||||
|
||||
timestamp = 0;
|
||||
}
|
||||
|
||||
/* write tag header */
|
||||
ph = hdr;
|
||||
|
||||
|
Reference in New Issue
Block a user