mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Cover AMF0 codec. 3.0.61
This commit is contained in:
parent
99ca2b9567
commit
da46091d3c
1 changed files with 10 additions and 1 deletions
|
@ -519,7 +519,7 @@ VOID TEST(ProtocolAMF0Test, InterfacesObject)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (true) {
|
if (true) {
|
||||||
uint8_t data[] = {0x00, 0x00, 0x02, 'i', 'd', 0x02, 0x00, 0x03, 's', 'r', 's'};
|
uint8_t data[] = {0x00, 0x00, 0x02, 'i', 'd', 0x02, 0x00, 0x03};
|
||||||
SrsBuffer b((char*)data, sizeof(data));
|
SrsBuffer b((char*)data, sizeof(data));
|
||||||
SrsAmf0Object* o = SrsAmf0Any::object();
|
SrsAmf0Object* o = SrsAmf0Any::object();
|
||||||
o->set("id", SrsAmf0Any::str("srs"));
|
o->set("id", SrsAmf0Any::str("srs"));
|
||||||
|
@ -534,6 +534,15 @@ VOID TEST(ProtocolAMF0Test, InterfacesObject)
|
||||||
HELPER_EXPECT_FAILED(o->read(&b));
|
HELPER_EXPECT_FAILED(o->read(&b));
|
||||||
srs_freep(o);
|
srs_freep(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (true) {
|
||||||
|
uint8_t data[] = {0x00, 0x00, 0x02, 'i', 'd', 0x02, 0x00, 0x03, 's', 'r', 's'};
|
||||||
|
SrsBuffer b((char*)data, sizeof(data));
|
||||||
|
SrsAmf0Object* o = SrsAmf0Any::object();
|
||||||
|
o->set("id", SrsAmf0Any::str("srs"));
|
||||||
|
HELPER_EXPECT_FAILED(o->write(&b));
|
||||||
|
srs_freep(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID TEST(ProtocolAMF0Test, InterfacesObject2)
|
VOID TEST(ProtocolAMF0Test, InterfacesObject2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue