Browse Source

hls: fix compatibility with video.js and iOS

add AUDs to all h264 packet groups
pull/509/head
aler9 5 years ago
parent
commit
6ad638d0e8
  1. 3
      internal/hls/tsfile.go

3
internal/hls/tsfile.go

@ -90,6 +90,9 @@ func (t *tsFile) writeH264(dts time.Duration, pts time.Duration, isIDR bool, nal @@ -90,6 +90,9 @@ func (t *tsFile) writeH264(dts time.Duration, pts time.Duration, isIDR bool, nal
}
}
// prepend an AUD. This is required by video.js and iOS
nalus = append([][]byte{{byte(h264.NALUTypeAccessUnitDelimiter), 240}}, nalus...)
enc, err := h264.EncodeAnnexB(nalus)
if err != nil {
return err

Loading…
Cancel
Save