1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

FLV: Drop packet if header flag is not matched. v5.0.109 (#3306)

1. Ignore audo or video packets if FLV header disable it.
2. Run: Add regression test config and run for IDEA.
3. Test: Refine regression test to allow no audio/video for FLV
4. Config: Whether drop packet if not match header.
This commit is contained in:
Winlin 2022-12-14 21:07:14 +08:00 committed by GitHub
parent 35185cf844
commit 4551200e95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 191 additions and 42 deletions

View file

@ -4666,9 +4666,9 @@ VOID TEST(ConfigEnvTest, CheckEnvValuesHttpRemux)
{
srs_error_t err;
if (true) {
MockSrsConfig conf;
MockSrsConfig conf;
if (true) {
SrsSetEnvConfig(http_remux_enabled, "SRS_VHOST_HTTP_REMUX_ENABLED", "on");
EXPECT_TRUE(conf.get_vhost_http_remux_enabled("__defaultVhost__"));
@ -4678,6 +4678,16 @@ VOID TEST(ConfigEnvTest, CheckEnvValuesHttpRemux)
SrsSetEnvConfig(http_remux_mount, "SRS_VHOST_HTTP_REMUX_MOUNT", "xxx");
EXPECT_STREQ("xxx", conf.get_vhost_http_remux_mount("__defaultVhost__").c_str());
}
if (true) {
EXPECT_TRUE(conf.get_vhost_http_remux_drop_if_not_match("__defaultVhost__"));
SrsSetEnvConfig(drop_if_not_match, "SRS_VHOST_HTTP_REMUX_DROP_IF_NOT_MATCH", "off");
EXPECT_FALSE(conf.get_vhost_http_remux_drop_if_not_match("__defaultVhost__"));
SrsSetEnvConfig(drop_if_not_match2, "SRS_VHOST_HTTP_REMUX_DROP_IF_NOT_MATCH", "on");
EXPECT_TRUE(conf.get_vhost_http_remux_drop_if_not_match("__defaultVhost__"));
}
}
VOID TEST(ConfigEnvTest, CheckEnvValuesDash)