mirror of
https://github.com/aler9/gortsplib
synced 2025-11-03 11:11:01 +08:00
avoid returning partial RTP-Info header, omit seq/rtptime if needed (#568)
* avoid returning partial RTP-Info header, omit seq/rtptime if needed * adjust test to align with new behavior of RTP-Info header
This commit is contained in:
@@ -128,15 +128,16 @@ func generateRTPInfo(
|
||||
|
||||
for _, sm := range setuppedMediasOrdered {
|
||||
entry := setuppedStream.rtpInfoEntry(sm.media, now)
|
||||
if entry != nil {
|
||||
entry.URL = (&base.URL{
|
||||
Scheme: u.Scheme,
|
||||
Host: u.Host,
|
||||
Path: setuppedPath + "/trackID=" +
|
||||
strconv.FormatInt(int64(setuppedStream.streamMedias[sm.media].trackID), 10),
|
||||
}).String()
|
||||
ri = append(ri, entry)
|
||||
if entry == nil {
|
||||
entry = &headers.RTPInfoEntry{}
|
||||
}
|
||||
entry.URL = (&base.URL{
|
||||
Scheme: u.Scheme,
|
||||
Host: u.Host,
|
||||
Path: setuppedPath + "/trackID=" +
|
||||
strconv.FormatInt(int64(setuppedStream.streamMedias[sm.media].trackID), 10),
|
||||
}).String()
|
||||
ri = append(ri, entry)
|
||||
}
|
||||
|
||||
if len(ri) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user