chore(h264): comment to explain boundary split
if Annex B boundary cuts off b/w packets, explain how it'll be handled
This commit is contained in:
parent
2a776bfcf6
commit
27d85c0c7f
@ -90,6 +90,9 @@ impl NalParser {
|
||||
let mut did_find_boundary = false;
|
||||
|
||||
for (idx, byte) in data.iter().enumerate() {
|
||||
// If the current FU-A has a boundary that splits at end, ignore the last or
|
||||
// last two zeros because this boundary will be handled when the start of
|
||||
// next packet is being read, and these zeros will be removed on walk-back.
|
||||
if byte == &0x00 && idx + 2 < data.len() && &data[idx..idx + 3] == &[0x00; 3] {
|
||||
debug!("Found boundary with index range: {} - {}.", idx, idx + 2);
|
||||
// we found a boundary, let NalParser know that it should now keep adding
|
||||
|
Loading…
Reference in New Issue
Block a user