diff --git a/revid/mtsSender_test.go b/revid/mtsSender_test.go index c6bbe48a..c5d91cdd 100644 --- a/revid/mtsSender_test.go +++ b/revid/mtsSender_test.go @@ -52,21 +52,21 @@ const ( ) type sender struct { - buf [][]byte - tstDiscon bool - disconAt int - curPktNo int + buf [][]byte + testDiscontinuities bool + discontinuityAt int + currentPkt int } func (ts *sender) send(d []byte) error { - if ts.tstDiscon && ts.curPktNo == ts.disconAt { - ts.curPktNo++ + if ts.testDiscontinuities && ts.currentPkt == ts.discontinuityAt { + ts.currentPkt++ return errors.New("could not send") } cpy := make([]byte, len(d)) copy(cpy, d) ts.buf = append(ts.buf, cpy) - ts.curPktNo++ + ts.currentPkt++ return nil } @@ -195,7 +195,7 @@ func TestSendFailDiscontinuity(t *testing.T) { // Create ringbuffer tst sender, loadsender and the mpegts encoder rb := ring.NewBuffer(rbSize, rbElementSize, wTimeout) const disconClipNo = 3 - tstSender := &sender{tstDiscon: true, disconAt: disconClipNo} + tstSender := &sender{testDiscontinuities: true, discontinuityAt: disconClipNo} loadSender := newMtsSender(tstSender, log) packer := tstPacker{rb: rb} encoder := mts.NewEncoder(&packer, 25)