Rewrite magic client

This commit is contained in:
Alexey Khit
2023-08-16 20:13:42 +03:00
parent c3ba8db660
commit 4a82eb3503
4 changed files with 10 additions and 53 deletions
+3 -1
View File
@@ -13,6 +13,8 @@ import (
"github.com/pion/rtp"
)
const Signature = "FLV"
type Client struct {
URL string
@@ -178,7 +180,7 @@ func (c *Client) readHeader() error {
return err
}
if string(b[:3]) != "FLV" {
if string(b[:3]) != Signature {
return errors.New("flv: wrong header")
}