revid: rename GetConfigRef to Config

This commit is contained in:
Dan Kortschak 2018-06-17 21:08:27 +09:30
parent 6de4f8c9a6
commit ed923ed256
1 changed files with 7 additions and 2 deletions

View File

@ -121,8 +121,13 @@ func (r *Revid) Bitrate() int {
return r.bitrate return r.bitrate
} }
// GetConfigRef returns a pointer to the revidInst's Config struct object // Config returns the Revid's config.
func (r *Revid) GetConfigRef() *Config { func (r *Revid) Config() *Config {
// FIXME(kortschak): This is a massive footgun and should not exist.
// Since the config's fields are accessed in running goroutines, any
// mutation is a data race. With bad luck a data race is possible by
// reading the returned value since it is possible for the running
// Ravid to mutate the config it holds.
return &r.config return &r.config
} }