mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1002402: (temporary) change SPS/PPS timestamps so webrtc jitter buffer won't drop them r=jesup
This commit is contained in:
parent
e41a3e1c8a
commit
4fd3ee35e5
@ -613,6 +613,19 @@ private:
|
||||
while (getNextNALUnit(&data, &size, &nalStart, &nalSize, true) == OK) {
|
||||
nalu._buffer = const_cast<uint8_t*>(nalStart);
|
||||
nalu._length = nalSize;
|
||||
// [Workaround] Jitter buffer code in WebRTC.org cannot correctly deliver
|
||||
// SPS/PPS/I-frame NALUs that share same timestamp. Change timestamp value
|
||||
// for SPS/PPS to avoid it.
|
||||
// TODO: remove when bug 985254 lands. The patch there has same workaround.
|
||||
switch (nalStart[0] & 0x1f) {
|
||||
case 7:
|
||||
nalu._timeStamp -= 100;
|
||||
case 8:
|
||||
nalu._timeStamp -= 50;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
mCallback->Encoded(nalu, nullptr, nullptr);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user