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

refine codes.

This commit is contained in:
winlin 2015-12-07 18:22:55 +08:00
parent b2ae1acaa4
commit fabcc91a0e
5 changed files with 71 additions and 1 deletions

View file

@ -630,6 +630,21 @@ SrsJsonAny* SrsJsonObject::ensure_property_integer(string name)
return prop;
}
SrsJsonAny* SrsJsonObject::ensure_property_number(string name)
{
SrsJsonAny* prop = get_property(name);
if (!prop) {
return NULL;
}
if (!prop->is_number()) {
return NULL;
}
return prop;
}
SrsJsonAny* SrsJsonObject::ensure_property_boolean(string name)
{
SrsJsonAny* prop = get_property(name);