From 078ba120933dfc4e337a00b8c5e7696456b1a545 Mon Sep 17 00:00:00 2001 From: saxon Date: Sun, 2 Sep 2018 14:20:25 +0930 Subject: [PATCH] rtmp: tried to replicate C behaviour by returning would be no of bytes written --- rtmp/rtmp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index f1226f01..7a66a6a1 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -2189,7 +2189,7 @@ func C_RTMP_Write(r *C_RTMP, buf []byte) int { return -1 } if len(buf) < 4 { - break + return size + (len(buf) - 4) } buf = buf[4:] }