Skip to content

Commit

Permalink
added timestamp cut in recorder to prevent negative (big unsigned) ti…
Browse files Browse the repository at this point in the history
…mestamps
  • Loading branch information
arut committed Feb 4, 2014
1 parent 8d1b1c1 commit 0210f7c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ngx_rtmp_record_module.c
Expand Up @@ -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;

Expand Down

0 comments on commit 0210f7c

Please sign in to comment.