From 6a61b5234e59e502cdd09141c98891d75a8cc292 Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Wed, 18 Jan 2023 09:36:32 +0300 Subject: [PATCH] Fix HTTP-FLV support for Reolink cameras --- pkg/httpflv/httpflv.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/httpflv/httpflv.go b/pkg/httpflv/httpflv.go index 54034df5..a744c14a 100644 --- a/pkg/httpflv/httpflv.go +++ b/pkg/httpflv/httpflv.go @@ -2,7 +2,6 @@ package httpflv import ( "bufio" - "errors" "github.com/deepch/vdk/av" "github.com/deepch/vdk/codec/h264parser" "github.com/deepch/vdk/format/flv/flvio" @@ -36,15 +35,12 @@ func Accept(res *http.Response) (*Conn, error) { return nil, err } - flags, n, err := flvio.ParseFileHeader(c.buf) + // ignore flags because Reolink cameras have a buggy realization + _, n, err := flvio.ParseFileHeader(c.buf) if err != nil { return nil, err } - if flags&flvio.FILE_HAS_VIDEO == 0 { - return nil, errors.New("not supported") - } - if _, err = c.reader.Discard(n); err != nil { return nil, err }