// Set associates a media instance with this media list. // If another media instance was present it will be released. // // Note: MediaList.Lock() should NOT be held upon entering this function. func (this *MediaList) Set(m *Media) error { if this.ptr == nil || m.ptr == nil { return &VLCError{"MediaList is nil"} } C.libvlc_media_list_set_media(this.ptr, m.ptr) return checkError() }
// Set associates a media instance with this media list. // If another media instance was present it will be released. // // Note: MediaList.Lock() should NOT be held upon entering this function. func (this *MediaList) Set(m *Media) error { if this.ptr == nil || m.ptr == nil { return os.EINVAL } C.libvlc_media_list_set_media(this.ptr, m.ptr) return checkError() }