warn users about skipped tracks when reading or publishing (#3753)
Some checks are pending
code_lint / golangci_lint (push) Waiting to run
code_lint / mod_tidy (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_highlevel (push) Waiting to run

This commit is contained in:
Alessandro Ros 2024-09-15 19:28:05 +02:00 committed by GitHub
parent 92a5aa5057
commit 471019f606
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 584 additions and 55 deletions

View file

@ -4,6 +4,7 @@ package rtmp
import (
"context"
ctls "crypto/tls"
"fmt"
"net"
"net/url"
"time"
@ -106,6 +107,10 @@ func (s *Source) runReader(u *url.URL, nconn net.Conn) error {
return err
}
if len(medias) == 0 {
return fmt.Errorf("no supported tracks found")
}
res := s.Parent.SetReady(defs.PathSourceStaticSetReadyReq{
Desc: &description.Session{Medias: medias},
GenerateRTPPackets: true,