mirror of
https://github.com/bluenviron/mediamtx
synced 2025-02-09 07:58:04 +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.
20 lines
368 B
Go
20 lines
368 B
Go
package core
|
|
|
|
import (
|
|
"github.com/aler9/gortsplib"
|
|
)
|
|
|
|
type streamTrackGeneric struct {
|
|
writeDataInner func(*data)
|
|
}
|
|
|
|
func newStreamTrackGeneric(track gortsplib.Track, writeDataInner func(*data)) *streamTrackGeneric {
|
|
return &streamTrackGeneric{
|
|
writeDataInner: writeDataInner,
|
|
}
|
|
}
|
|
|
|
func (t *streamTrackGeneric) writeData(data *data) {
|
|
t.writeDataInner(data)
|
|
}
|