Skip to content

Commit

Permalink
[test] fix inner test for #efcfc1100e683ba02af2914dab55b4771aa8bdb5
Browse files Browse the repository at this point in the history
  • Loading branch information
q191201771 committed Sep 7, 2023
1 parent 6af11b2 commit 8c2107a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkg/innertest/innertest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
)

Expand Down
3 changes: 2 additions & 1 deletion pkg/mpegts/pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ package mpegts
import (
"encoding/hex"
"fmt"

"github.com/q191201771/naza/pkg/nazabytes"
)

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 8c2107a

Please sign in to comment.