From 23ce929048d9142da8905112aef47284b4a07783 Mon Sep 17 00:00:00 2001 From: kyxlx550 Date: Sat, 25 Apr 2020 13:27:50 +0800 Subject: [PATCH] update gb28181 config wait_keyframe default on --- trunk/conf/full.conf | 3 ++- trunk/conf/push.gb28181.conf | 2 +- trunk/src/app/srs_app_config.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index 4dda4744f..de7efd59d 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -319,7 +319,8 @@ stream_caster { rtp_port_min 58200; rtp_port_max 58300; # Whether wait for keyframe then forward to RTMP. - wait_keyframe off; + # default: on + wait_keyframe on; # Max timeout in seconds for RTP stream, if timeout, RTCP bye and close stream. # default: 30 rtp_idle_timeout 30; diff --git a/trunk/conf/push.gb28181.conf b/trunk/conf/push.gb28181.conf index 27b7996ef..bdabfe6af 100644 --- a/trunk/conf/push.gb28181.conf +++ b/trunk/conf/push.gb28181.conf @@ -36,7 +36,7 @@ stream_caster { # 是否等待关键帧之后,再转发, # off:不需等待,直接转发 # on:等第一个关键帧后,再转发 - wait_keyframe off; + wait_keyframe on; # rtp包空闲等待时间,如果指定时间没有收到任何包 # rtp监听连接自动停止,发送BYE命令 diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 5f92d22fe..95fbf7038 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -4543,7 +4543,7 @@ bool SrsConfig::get_stream_caster_gb28181_audio_enable(SrsConfDirective* conf) bool SrsConfig::get_stream_caster_gb28181_wait_keyframe(SrsConfDirective* conf) { - static bool DEFAULT = false; + static bool DEFAULT = true; if (!conf) { return DEFAULT;