mediamtx/internal/core/streamtrack_generic.go
aler9 3606472e82 generate RTP packets after H264 remuxing
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.
2022-08-14 13:03:04 +02:00

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)
}