added stream wrapping when positioned at the end to escape client hang

This commit is contained in:
Roman Arutyunyan 2012-07-05 02:50:14 +04:00
parent 47bade991b
commit 313fd228a1

View file

@ -241,6 +241,9 @@ ngx_rtmp_play_send(ngx_event_t *e)
if (n != sizeof(header)) {
ngx_log_error(NGX_LOG_ERR, s->connection->log, 0,
"play: could not read flv tag header");
if (ctx->msg_mask == 0) {
ngx_rtmp_play_restart(s, 0);
}
return;
}
ctx->offset += sizeof(header);