mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 23:02:45 +08:00
track_h264: avoid appending empty sps to fmtp line (#129)
This avoids adding fmtp lines of the form "sprop-parameter-sets=" with no value.
This commit is contained in:
@@ -144,7 +144,9 @@ func (t *TrackH264) MediaDescription() *psdp.MediaDescription {
|
||||
if t.PPS != nil {
|
||||
tmp = append(tmp, base64.StdEncoding.EncodeToString(t.PPS))
|
||||
}
|
||||
fmtp += "; sprop-parameter-sets=" + strings.Join(tmp, ",")
|
||||
if len(tmp) > 0 {
|
||||
fmtp += "; sprop-parameter-sets=" + strings.Join(tmp, ",")
|
||||
}
|
||||
|
||||
if len(t.SPS) >= 4 {
|
||||
fmtp += "; profile-level-id=" + strings.ToUpper(hex.EncodeToString(t.SPS[1:4]))
|
||||
|
Reference in New Issue
Block a user