From 1edcc5a67018eabe1edaaafa02082a16ae0d4d4d Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Sun, 6 Aug 2023 15:51:26 +0200 Subject: [PATCH] remove warning when decoding VP8 or VP9 (#2159) avoid printing 'received a non-starting fragment without any previous starting fragment' --- internal/formatprocessor/vp8.go | 2 +- internal/formatprocessor/vp9.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/formatprocessor/vp8.go b/internal/formatprocessor/vp8.go index 5db500ba..29600911 100644 --- a/internal/formatprocessor/vp8.go +++ b/internal/formatprocessor/vp8.go @@ -81,7 +81,7 @@ func (t *formatProcessorVP8) Process(unit Unit, hasNonRTSPReaders bool) error { frame, pts, err := t.decoder.Decode(pkt) if err != nil { - if err == rtpvp8.ErrMorePacketsNeeded { + if err == rtpvp8.ErrNonStartingPacketAndNoPrevious || err == rtpvp8.ErrMorePacketsNeeded { return nil } return err diff --git a/internal/formatprocessor/vp9.go b/internal/formatprocessor/vp9.go index ca255c2f..601ee7a1 100644 --- a/internal/formatprocessor/vp9.go +++ b/internal/formatprocessor/vp9.go @@ -81,7 +81,7 @@ func (t *formatProcessorVP9) Process(unit Unit, hasNonRTSPReaders bool) error { frame, pts, err := t.decoder.Decode(pkt) if err != nil { - if err == rtpvp9.ErrMorePacketsNeeded { + if err == rtpvp9.ErrNonStartingPacketAndNoPrevious || err == rtpvp9.ErrMorePacketsNeeded { return nil } return err