fix streamid zero error

This commit is contained in:
xiongguangjie
2022-06-04 12:03:56 +08:00
parent 91aa9c494c
commit af9bd2dd0a
3 changed files with 9 additions and 3 deletions

View File

@@ -81,7 +81,9 @@ bool HSExtStreamID::loadFromData(uint8_t *buf, size_t len) {
ptr+=4;
}
char zero = 0x00;
streamid.erase(streamid.find_first_of(zero),streamid.size());
if(streamid.back() == zero){
streamid.erase(streamid.find_first_of(zero),streamid.size());
}
return true;
}