From 8c2107a780ab1c8a686a3c2d9428cfda5f33e0bf Mon Sep 17 00:00:00 2001 From: q191201771 <191201771@qq.com> Date: Thu, 7 Sep 2023 21:06:16 +0800 Subject: [PATCH] [test] fix inner test for #efcfc1100e683ba02af2914dab55b4771aa8bdb5 --- pkg/innertest/innertest.go | 8 ++++---- pkg/mpegts/pack.go | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/innertest/innertest.go b/pkg/innertest/innertest.go index 055e8c3c..9cd3a418 100644 --- a/pkg/innertest/innertest.go +++ b/pkg/innertest/innertest.go @@ -463,16 +463,16 @@ var ( goldenHlsTsNumList = []int{8, 10, 8} goldenHlsTsLenList = []int{2219152, 525648, 1696512} goldenHlsTsMd5List = []string{ - "b60463d6cde1f48e33dfa6fc8f15032c", + "5a05b84486382f3b8d2a0f9e75c67623", "f03c5ab24dddd8875f06cdea605cd87c", - "84e0f26516993b5b2cc9807b5877dd7d", + "ceec699eae6671507376c26ac1cdaba4", } goldenHttptsLenList = []int{2216332, 522264, 1693880} goldenHttptsMd5List = []string{ - "3d1c1cd75e09ad04cb8a96db28865692", + "3ba4baa20df968196eac75d96f8041b5", "0ec316060f1aeeb1d283b30158c2eeb8", - "3cb68ac55d6ef7fdab75d767ff87a1a3", + "e0d90dd5efd1119f1f66db8ac4cf5d48", } ) diff --git a/pkg/mpegts/pack.go b/pkg/mpegts/pack.go index 103fe31f..7553ad8f 100644 --- a/pkg/mpegts/pack.go +++ b/pkg/mpegts/pack.go @@ -11,7 +11,6 @@ package mpegts import ( "encoding/hex" "fmt" - "github.com/q191201771/naza/pkg/nazabytes" ) @@ -119,11 +118,13 @@ func (frame *Frame) Pack() []byte { packet[3] |= 0x20 // adaptation_field_control č®¾ē½®Adaptation packet[4] = 7 // adaptation_field_length packet[5] = 0x50 // random_access_indicator + PCR_flag + pcr := uint64(0) if frame.Dts > delay { pcr = frame.Dts - delay } packPcr(packet[6:], pcr) // using 6 byte + wpos += 8 }