Fix RTMP to WebRTC

This commit is contained in:
Alexey Khit
2022-08-18 23:25:09 +03:00
parent e0a3e5ae96
commit 6dceed64ed
3 changed files with 64 additions and 16 deletions
+4 -2
View File
@@ -55,10 +55,12 @@ func (c *Conn) AddTrack(media *streamer.Media, track *streamer.Track) *streamer.
wrapper := h264.RTPPay(1200)
push = wrapper(push)
if !h264.IsAVC(codec) {
if h264.IsAVC(codec) {
wrapper = h264.RepairAVC(track)
} else {
wrapper = h264.RTPDepay(track)
push = wrapper(push)
}
push = wrapper(push)
}
track = track.Bind(push)