|
|
|
@ -561,6 +561,24 @@ SrsAmf0Any* SrsUnSortedHashtable::ensure_property_number(string name)
|
|
|
|
|
return prop;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SrsUnSortedHashtable::remove(string name)
|
|
|
|
|
{
|
|
|
|
|
std::vector<SrsAmf0ObjectPropertyType>::iterator it;
|
|
|
|
|
|
|
|
|
|
for (it = properties.begin(); it != properties.end();) {
|
|
|
|
|
std::string key = it->first;
|
|
|
|
|
SrsAmf0Any* any = it->second;
|
|
|
|
|
|
|
|
|
|
if (key == name) {
|
|
|
|
|
srs_freep(any);
|
|
|
|
|
|
|
|
|
|
it = properties.erase(it);
|
|
|
|
|
} else {
|
|
|
|
|
++it;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SrsUnSortedHashtable::copy(SrsUnSortedHashtable* src)
|
|
|
|
|
{
|
|
|
|
|
std::vector<SrsAmf0ObjectPropertyType>::iterator it;
|
|
|
|
@ -849,6 +867,11 @@ SrsAmf0Any* SrsAmf0Object::ensure_property_number(string name)
|
|
|
|
|
return properties->ensure_property_number(name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SrsAmf0Object::remove(string name)
|
|
|
|
|
{
|
|
|
|
|
properties->remove(name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SrsAmf0EcmaArray::SrsAmf0EcmaArray()
|
|
|
|
|
{
|
|
|
|
|
_count = 0;
|
|
|
|
|