Merged in get-pts-range-fix (pull request #207)

container/mts: for GetPTSRange if a second PTS is not found error is no longer returned and pts2=pts1

Approved-by: Alan Noble <anoble@gmail.com>
This commit is contained in:
Saxon Milton 2019-06-29 05:55:50 +00:00 committed by Alan Noble
commit 74d22dde2e
1 changed files with 1 additions and 3 deletions

View File

@ -331,7 +331,6 @@ func GetPTSRange(clip []byte, pid uint16) (pts [2]uint64, err error) {
copy(_pkt[:], pkt) copy(_pkt[:], pkt)
payload, err := packet.Payload(&_pkt) payload, err := packet.Payload(&_pkt)
if err != nil { if err != nil {
fmt.Printf("_pkt: %v\n", _pkt)
return [2]uint64{}, err return [2]uint64{}, err
} }
@ -358,6 +357,5 @@ func GetPTSRange(clip []byte, pid uint16) (pts [2]uint64, err error) {
return return
} }
} }
return
return [2]uint64{}, errors.New("could only find one access unit in mpegts clip")
} }