From 45f5107ae39df31632850a6b1b6c20f7c701319e Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Fri, 3 Jun 2022 22:42:09 +0200 Subject: [PATCH] fix error 'wrong_nal_ref_idc' with some streams (https://github.com/aler9/rtsp-simple-server/issues/966) --- pkg/h264/sps.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/h264/sps.go b/pkg/h264/sps.go index 278dbf16..5588b332 100644 --- a/pkg/h264/sps.go +++ b/pkg/h264/sps.go @@ -567,7 +567,7 @@ func (s *SPS) Unmarshal(buf []byte) error { return fmt.Errorf("wrong forbidden bit") } - if nalRefIdc != 3 { + if nalRefIdc == 0 { return fmt.Errorf("wrong nal_ref_idc") }