Only add width and height if they have a value

This commit is contained in:
Isaac Connor 2021-03-04 13:25:57 -05:00
parent 7da1e48456
commit d20521569d
1 changed files with 3 additions and 2 deletions

View File

@ -74,8 +74,9 @@ std::list< std::pair<unsigned char*, size_t> > H264_ZoneMinderFifoSource::splitF
std::ostringstream os;
os << "profile-level-id=" << std::hex << std::setw(6) << std::setfill('0') << profile_level_id;
os << ";sprop-parameter-sets=" << sps_base64 << "," << pps_base64;
os << "\r\n" << "a=x-dimensions:" << m_width << "," << m_height << "\r\n";
os << ";sprop-parameter-sets=" << sps_base64 << "," << pps_base64 << "\r\n";
if (!(m_width and m_height))
os << "a=x-dimensions:" << m_width << "," << m_height << "\r\n";
m_auxLine.assign(os.str());
Debug(3, "auxLine: %s", m_auxLine.c_str());