Commit 559b4d3f by xiongguangjie

for srt more check config

parent dfec2d76
...@@ -323,12 +323,20 @@ void SrtTransportImp::doCachedFunc() { ...@@ -323,12 +323,20 @@ void SrtTransportImp::doCachedFunc() {
int SrtTransportImp::getLatencyMul() { int SrtTransportImp::getLatencyMul() {
GET_CONFIG(int, latencyMul, kLatencyMul); GET_CONFIG(int, latencyMul, kLatencyMul);
if (latencyMul <= 0) {
WarnL << "config srt " << kLatencyMul << " not vaild";
return 4;
}
return latencyMul; return latencyMul;
} }
int SrtTransportImp::getPktBufSize() { int SrtTransportImp::getPktBufSize() {
// kPktBufSize // kPktBufSize
GET_CONFIG(int, pktBufSize, kPktBufSize); GET_CONFIG(int, pktBufSize, kPktBufSize);
if (pktBufSize <= 0) {
WarnL << "config srt " << kPktBufSize << " not vaild";
return 8912;
}
return pktBufSize; return pktBufSize;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论