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:] }