Add a debug function to print out the start of the nal

This commit is contained in:
Isaac Connor 2021-03-01 14:00:47 -05:00
parent 53851b67c7
commit 19d9812a3f
1 changed files with 12 additions and 1 deletions

View File

@ -52,6 +52,17 @@ class NAL_Frame {
} }
return false; return false;
} }
void debug() {
if ( m_size <= 4 ) {
Debug(1, "NAL: %d: %.2x %.2x %.2x %.2x", m_size,
m_buffer[0], m_buffer[1], m_buffer[2], m_buffer[3]);
} else {
Debug(1, "NAL: %d: %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x ", m_size,
m_buffer[0], m_buffer[1], m_buffer[2], m_buffer[3],
m_buffer[4], m_buffer[5], m_buffer[6], m_buffer[7]
);
}
}
private: private:
unsigned char* m_buffer; unsigned char* m_buffer;