mirror of
https://github.com/hsnks100/liveflow.git
synced 2025-09-27 04:26:24 +08:00
Fix RTMP handler not calling for audio, video
This commit is contained in:
@@ -139,7 +139,7 @@ func (h *Handler) OnSetDataFrame(timestamp uint32, data *rtmpmsg.NetStreamSetDat
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handler) onAudio(timestamp uint32, payload io.Reader) error {
|
func (h *Handler) OnAudio(timestamp uint32, payload io.Reader) error {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
_, err := io.Copy(&buf, payload)
|
_, err := io.Copy(&buf, payload)
|
||||||
@@ -189,7 +189,7 @@ func (h *Handler) onAudio(timestamp uint32, payload io.Reader) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handler) onVideo(timestamp uint32, payload io.Reader) error {
|
func (h *Handler) OnVideo(timestamp uint32, payload io.Reader) error {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
// Read the payload data into a buffer
|
// Read the payload data into a buffer
|
||||||
|
Reference in New Issue
Block a user