mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
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:
parent
3f0771bb31
commit
a8822b9f15
13 changed files with 55 additions and 67 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue