H264SpsPpsTracker.InsertSpsPpsNalus() should accept Nalus with header.

- Changed method name to clarify that entire Nalus are expected.
- Added unit test code.
- Adjusted InsetSpsPpsNalus() implementation to above requirement.

BUG=webrtc:5948

Review-Url: https://codereview.webrtc.org/2638933002
Cr-Commit-Position: refs/heads/master@{#16221}
This commit is contained in:
johan
2017-01-23 09:29:33 -08:00
committed by Commit bot
parent e1405ad0d1
commit f53d7374cf
4 changed files with 102 additions and 10 deletions

View File

@ -29,8 +29,9 @@ class H264SpsPpsTracker {
enum PacketAction { kInsert, kDrop, kRequestKeyframe };
PacketAction CopyAndFixBitstream(VCMPacket* packet);
void InsertSpsPps(const std::vector<uint8_t>& sps,
const std::vector<uint8_t>& pps);
void InsertSpsPpsNalus(const std::vector<uint8_t>& sps,
const std::vector<uint8_t>& pps);
private:
struct PpsInfo {