diff --git a/container/mts/payload.go b/container/mts/payload.go index 9785f2f0..d05e994e 100644 --- a/container/mts/payload.go +++ b/container/mts/payload.go @@ -184,6 +184,8 @@ var ( errMetaUpperBound = errors.New("meta 'to' cannot be found") ) +// BytesForMetaInterval will return the media data as a slice between two meta +// values 'from' and 'to', of key 'key'. The meta values must not be the same. func (c *Clip) BytesForMetaInterval(key, from, to string) ([]byte, error) { // First check that the interval makes sense. if from == to { diff --git a/container/mts/payload_test.go b/container/mts/payload_test.go index 3ae114e7..d56ca516 100644 --- a/container/mts/payload_test.go +++ b/container/mts/payload_test.go @@ -316,6 +316,8 @@ func TestBytesForPTSInterval(t *testing.T) { } } +// TestBytesForMetaInterval checks that we can correctly get media data between +// two meta values using BytesForMetaInterval. func TestBytesForMetaInterval(t *testing.T) { const ( numOfTestFrames = 10