From 521f8998b0cf1e197152655b214285ebde974fd3 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Mon, 3 Feb 2014 11:16:01 +0400 Subject: [PATCH] implemented play2 time continuation --- ngx_rtmp_cmd_module.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ngx_rtmp_cmd_module.c b/ngx_rtmp_cmd_module.c index 8d30d56..13f6677 100644 --- a/ngx_rtmp_cmd_module.c +++ b/ngx_rtmp_cmd_module.c @@ -626,6 +626,12 @@ ngx_rtmp_cmd_play2_init(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h, "play2: name='%s' args='%s' start=%i", v.name, v.args, (ngx_int_t) v.start); + /* continue from current timestamp */ + + if (v.start < 0) { + v.start = s->current_time; + } + ngx_memzero(&vc, sizeof(vc)); /* close_stream should be synchronous */