mirror of
https://github.com/bluenviron/mediamtx
synced 2025-01-27 17:33:33 +00:00
3606472e82
Previously, RTP packets coming from sources other than RTSP (that actually are RTMP and HLS) were generated before the H264 remuxing, and that leaded to invalid streams, expecially when sourceOnDemand is true and the stream has invalid or dynamic SPS/PPS.
27 lines
414 B
Go
27 lines
414 B
Go
package core
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/pion/rtp"
|
|
)
|
|
|
|
// data is the data unit routed across the server.
|
|
// it must contain one or more of the following:
|
|
// - a single RTP packet
|
|
// - a group of H264 NALUs (grouped by timestamp)
|
|
// - a single AAC AU
|
|
type data struct {
|
|
trackID int
|
|
|
|
rtpPacket *rtp.Packet
|
|
|
|
// timing
|
|
ptsEqualsDTS bool
|
|
pts time.Duration
|
|
|
|
h264NALUs [][]byte
|
|
|
|
mpeg4AudioAU []byte
|
|
}
|