hls muxer / source: route AAC units singularly

This aligns the HLS implementation with the rest of the server. In case
of HLS/MPEGTS, the server now generates an ADTS packet for each AU,
without grouping multiple AUs into a single ADTS packet.
This commit is contained in:
aler9 2022-08-14 12:16:39 +02:00
parent 3f0771bb31
commit a8822b9f15
13 changed files with 55 additions and 67 deletions

View file

@ -119,12 +119,12 @@ func (s *hlsSource) run(ctx context.Context) error {
}
}
onAudioData := func(pts time.Duration, aus [][]byte) {
onAudioData := func(pts time.Duration, au []byte) {
if stream == nil {
return
}
pkts, err := audioEnc.Encode(aus, pts)
pkts, err := audioEnc.Encode([][]byte{au}, pts)
if err != nil {
return
}