提交 81ad7562 authored 作者: Seven Du's avatar Seven Du

CID:1301050 fix possible NULL

上级 55462887
...@@ -1713,12 +1713,14 @@ SWITCH_STANDARD_API(rtmp_function) ...@@ -1713,12 +1713,14 @@ SWITCH_STANDARD_API(rtmp_function)
} }
} else if (!strcmp(argv[2], "rescan")) { } else if (!strcmp(argv[2], "rescan")) {
rtmp_profile_t *profile = rtmp_profile_locate(argv[1]); rtmp_profile_t *profile = rtmp_profile_locate(argv[1]);
if (config_profile(profile, SWITCH_TRUE) == SWITCH_STATUS_SUCCESS) { if (profile) {
stream->write_function(stream, "+OK\n"); if (config_profile(profile, SWITCH_TRUE) == SWITCH_STATUS_SUCCESS) {
} else { stream->write_function(stream, "+OK\n");
stream->write_function(stream, "-ERR Config error\n"); } else {
stream->write_function(stream, "-ERR Config error\n");
}
rtmp_profile_release(profile);
} }
rtmp_profile_release(profile);
} else if (!strcmp(argv[2], "restart")) { } else if (!strcmp(argv[2], "restart")) {
rtmp_profile_t *profile = rtmp_profile_locate(argv[1]); rtmp_profile_t *profile = rtmp_profile_locate(argv[1]);
if (profile) { if (profile) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论