Skip to content

Commit

Permalink
[fix] fix a bug may lead to infinite loop and fix a typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
winshining committed Apr 29, 2019
1 parent 0943319 commit 7485e34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ nginx-http-flv-module包含了[nginx-rtmp-module](https://github.com/arut/nginx-

配置项`rtmp_auto_push``rtmp_auto_push_reconnect``rtmp_socket_dir`在Windows上不起作用,除了Windows 10 17063以及后续版本之外,因为多进程模式的`relay`需要Unix domain socket的支持,详情请参考[Unix domain socket on Windows 10](https://blogs.msdn.microsoft.com/commandline/2017/12/19/af_unix-comes-to-windows)

最好将配置项`worker_processes`设置为1,因为在多进程模式下,`ngx_rtmp_stat_module`可能不会从指定的worker进程获取统计数据,因为HTTP请求是被随机分配给worker进程的。`ngx_rtmp_control_module`也有同样的问题。这个问题可以通过这个布丁[per-worker-listener](https://github.com/arut/nginx-patches/blob/master/per-worker-listener)优化。
最好将配置项`worker_processes`设置为1,因为在多进程模式下,`ngx_rtmp_stat_module`可能不会从指定的worker进程获取统计数据,因为HTTP请求是被随机分配给worker进程的。`ngx_rtmp_control_module`也有同样的问题。这个问题可以通过这个补丁[per-worker-listener](https://github.com/arut/nginx-patches/blob/master/per-worker-listener)优化。

另外,`vhost`功能在多进程模式下还不能完全正确运行,等待修复。例如,下面的配置在多进程模式下是没有问题的:

Expand Down
4 changes: 4 additions & 0 deletions ngx_rtmp_mp4_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,10 @@ ngx_rtmp_mp4_parse(ngx_rtmp_session_t *s, u_char *pos, u_char *last)

hdr = (uint32_t *) pos;
size = ngx_rtmp_r32(hdr[0]);
if (size == 0) {
return NGX_ERROR;
}

tag = hdr[1];

if (pos + size > last) {
Expand Down

0 comments on commit 7485e34

Please sign in to comment.