mirror of https://bitbucket.org/ausocean/av.git
stream/mts/encoder.go: changed updateMeta signature to return bytes slice rather than passing in pointer to byte slice.
This commit is contained in:
parent
dc46d9f0b2
commit
6b32064a2b
|
@ -216,7 +216,7 @@ func (e *Encoder) writePSI() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = updateMeta(&pmtTable)
|
||||
pmtTable, err = updateMeta(pmtTable)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -262,9 +262,8 @@ func (e *Encoder) ccFor(pid int) byte {
|
|||
|
||||
// updateMeta adds/updates a metaData descriptor in the given psi bytes using data
|
||||
// contained in the global Meta struct.
|
||||
func updateMeta(b *[]byte) error {
|
||||
p := psi.PSIBytes(*b)
|
||||
func updateMeta(b []byte) ([]byte, error) {
|
||||
p := psi.PSIBytes(b)
|
||||
err := p.AddDescriptor(psi.MetadataTag, Meta.Encode())
|
||||
*b = []byte(p)
|
||||
return err
|
||||
return []byte(p), err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue