mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 15:46:51 +08:00
media: remove pointer from Medias.FindFormat()
This commit is contained in:
@@ -91,8 +91,8 @@ func (ms Medias) SetControls() {
|
|||||||
|
|
||||||
// FindFormat finds a certain format among all the formats in all the medias.
|
// FindFormat finds a certain format among all the formats in all the medias.
|
||||||
// If the format is found, it is inserted into trak, and format media is returned.
|
// If the format is found, it is inserted into trak, and format media is returned.
|
||||||
func (ms *Medias) FindFormat(trak interface{}) *Media {
|
func (ms Medias) FindFormat(trak interface{}) *Media {
|
||||||
for _, media := range *ms {
|
for _, media := range ms {
|
||||||
for _, trakk := range media.Formats {
|
for _, trakk := range media.Formats {
|
||||||
if reflect.TypeOf(trakk) == reflect.TypeOf(trak).Elem() {
|
if reflect.TypeOf(trakk) == reflect.TypeOf(trak).Elem() {
|
||||||
reflect.ValueOf(trak).Elem().Set(reflect.ValueOf(trakk))
|
reflect.ValueOf(trak).Elem().Set(reflect.ValueOf(trakk))
|
||||||
|
Reference in New Issue
Block a user