Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Cleanup

Gabe Kangas3b17dd46101b
diff --git a/core/rtmp/rtmp.go b/core/rtmp/rtmp.go
index 3bd3ad51df..f59fa3cb05 100644
--- a/core/rtmp/rtmp.go
+++ b/core/rtmp/rtmp.go
@@ -18,7 +18,6 @@ import (
"github.com/gabek/owncast/core"
"github.com/gabek/owncast/core/ffmpeg"
"github.com/gabek/owncast/utils"
- "github.com/nareix/joy5/codec/h264"
"github.com/nareix/joy5/format/rtmp"
)
@@ -98,21 +97,22 @@ func HandleConn(c *rtmp.Conn, nc net.Conn) {
for {
pkt, err := c.ReadPacket()
- if err != nil {
- if err == io.EOF {
- handleDisconnect(nc)
- }
+ if err == io.EOF {
+ handleDisconnect(nc)
+ return
}
- if pkt.Type == av.H264 {
- nalus, _ := h264.SplitNALUs(pkt.Data)
- annexb := h264.JoinNALUsAnnexb(nalus)
- avcc := h264.JoinNALUsAVCC([][]byte{annexb})
- pkt.Data = avcc
- } else if pkt.Type == av.Metadata {
+ if pkt.Type == av.Metadata {
log.Traceln(string(pkt.Data))
}
+ // if pkt.Type == av.H264 {
+ // nalus, _ := h264.SplitNALUs(pkt.Data)
+ // annexb := h264.JoinNALUsAnnexb(nalus)
+ // avcc := h264.JoinNALUsAVCC([][]byte{annexb})
+ // pkt.Data = avcc
+ // }
+
if err := w.WritePacket(pkt); err != nil {
panic(err)
}