added timestamp cut in recorder to prevent negative (big unsigned) timestamps

This commit is contained in:
Roman Arutyunyan 2014-02-04 14:32:32 +04:00
parent 8d1b1c1243
commit 0210f7ca83

View file

@ -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;