srs
srs copied to clipboard
Config: Failed to parse config ending with newline.
Description'
Please ensure that the markdown structure is maintained.
Documentation for realtime config has an error
- SRS version:
3.0.153 - The log of SRS is as follows:'
Please ensure that the markdown structure is maintained.
start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=0, tcp_nodelay=1
- The configuration of SRS is as follows:
Please ensure that the markdown structure is maintained.
# the listen ports, split by space.
listen 1935;
vhost __defaultVhost__ {
tcp_nodelay on
min_latency on;
play {
gop_cache off;
queue_length 10;
mw_latency 100;
}
publish {
mr off;
}
}
Replay
Please ensure that the markdown structure is maintained.
Play stream with rtmp client and check log
Expect
Please ensure that the markdown structure is maintained.
realtime=1
If I add the missing semi-colon to the config after tcp_nodelay on then the min_latency setting is applied correctly. The sample configuration is incorrect in both conf/realtime.conf and the wiki in both languages.
TRANS_BY_GPT3
It seems a bug.
It's bug for config to parsing the config directive, should be error when ends with '\n' without ';'
Postpone to 5.0
Each config directive should end with ; or semi-colon. We should not only fix this bug, but also cover by utest. This means bellow testcase should fail, as tcp_nodelay on is missing a semicolon:
tcp_nodelay on
min_latency on;