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

This commit is contained in:
Saxon 2019-06-29 14:58:16 +09:30
parent dae6151bae
commit ebc72cfbfc
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")
} }