mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-27 21:42:01 -08:00
hls: cleanup
This commit is contained in:
parent
de70566179
commit
eda8eddf5a
1 changed files with 3 additions and 4 deletions
|
|
@ -98,15 +98,14 @@ func (m *muxerTSGenerator) writeH264(pts time.Duration, nalus [][]byte) error {
|
|||
}
|
||||
|
||||
for _, nalu := range nalus {
|
||||
// remove existing SPS, PPS, AUD
|
||||
typ := h264.NALUType(nalu[0] & 0x1F)
|
||||
switch typ {
|
||||
case h264.NALUTypeSPS, h264.NALUTypePPS, h264.NALUTypeAccessUnitDelimiter:
|
||||
// remove existing SPS, PPS, AUD
|
||||
continue
|
||||
}
|
||||
|
||||
// add SPS and PPS before every IDR
|
||||
if typ == h264.NALUTypeIDR {
|
||||
case h264.NALUTypeIDR:
|
||||
// add SPS and PPS before every IDR
|
||||
filteredNALUs = append(filteredNALUs, m.h264Conf.SPS, m.h264Conf.PPS)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue