mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 14:52:46 +08:00
allow setting additional properties of streams through description.Stream
This commit is contained in:
@@ -31,14 +31,14 @@ func main() {
|
||||
defer c.Close()
|
||||
|
||||
// find published medias
|
||||
medias, baseURL, _, err := c.Describe(u)
|
||||
desc, _, err := c.Describe(u)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// find the MPEG4-audio media and format
|
||||
var forma *format.MPEG4Audio
|
||||
medi := medias.FindFormat(&forma)
|
||||
medi := desc.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
}
|
||||
@@ -50,7 +50,7 @@ func main() {
|
||||
}
|
||||
|
||||
// setup a single media
|
||||
_, err = c.Setup(baseURL, medi, 0, 0)
|
||||
_, err = c.Setup(desc.BaseURL, medi, 0, 0)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user