mts: updated reference to old pid vars

This commit is contained in:
Trek H 2019-06-06 02:54:00 +09:30
parent 34fc64383e
commit d23f40c85d
2 changed files with 3 additions and 3 deletions

View File

@ -197,7 +197,7 @@ func TestEncodePcm(t *testing.T) {
for i+PacketSize <= len(clip) { for i+PacketSize <= len(clip) {
// Check MTS packet // Check MTS packet
if !(pkt.PID() == audioPid) { if !(pkt.PID() == AudioPid) {
i += PacketSize i += PacketSize
if i+PacketSize <= len(clip) { if i+PacketSize <= len(clip) {
copy(pkt[:], clip[i:i+PacketSize]) copy(pkt[:], clip[i:i+PacketSize])

View File

@ -79,7 +79,7 @@ func TestGetPTSRange(t *testing.T) {
curTime += interval curTime += interval
} }
got, err := GetPTSRange(clip.Bytes(), videoPid) got, err := GetPTSRange(clip.Bytes(), VideoPid)
if err != nil { if err != nil {
t.Fatalf("did not expect error getting PTS range: %v", err) t.Fatalf("did not expect error getting PTS range: %v", err)
} }
@ -139,7 +139,7 @@ func writeFrame(b *bytes.Buffer, frame []byte, pts uint64) error {
for len(buf) != 0 { for len(buf) != 0 {
pkt := Packet{ pkt := Packet{
PUSI: pusi, PUSI: pusi,
PID: videoPid, PID: VideoPid,
RAI: pusi, RAI: pusi,
CC: 0, CC: 0,
AFC: hasAdaptationField | hasPayload, AFC: hasAdaptationField | hasPayload,