remove warning when decoding VP8 or VP9 (#2159)

avoid printing 'received a non-starting fragment without any previous starting fragment'
This commit is contained in:
Alessandro Ros 2023-08-06 15:51:26 +02:00 committed by GitHub
parent ff01e56dfe
commit 1edcc5a670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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