From: qydysky Date: Sun, 16 Feb 2025 12:55:56 +0000 (+0800) Subject: Fix genFastSeedErr (#169) X-Git-Tag: v0.15.9~1 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=59284123ac001a85abadd237c17e148b6ad88f15;p=bili_danmu%2F.git Fix genFastSeedErr (#169) --- diff --git a/Reply/flvDecode.go b/Reply/flvDecode.go index e2840f7..881f0f1 100644 --- a/Reply/flvDecode.go +++ b/Reply/flvDecode.go @@ -398,7 +398,10 @@ func (t *FlvDecoder) GenFastSeed(reader io.Reader, save func(seedTo time.Duratio if firstFT == -1 { firstFT = t } - return perrors.Join(ActionGenFastSeedFlv, save(time.Millisecond*time.Duration(t-firstFT), int64(totalRead-buff.Size()+index))) + if e := save(time.Millisecond*time.Duration(t-firstFT), int64(totalRead-buff.Size()+index)); e != nil { + return perrors.Join(ActionGenFastSeedFlv, e) + } + return nil }); e != nil { return perrors.Join(ActionGenFastSeedFlv, ActionOneFFlv, e) } else { diff --git a/Reply/fmp4Decode.go b/Reply/fmp4Decode.go index 27923ab..667769c 100644 --- a/Reply/fmp4Decode.go +++ b/Reply/fmp4Decode.go @@ -822,7 +822,10 @@ func (t *Fmp4Decoder) GenFastSeed(reader io.Reader, save func(seedTo time.Durati if firstFT == -1 { firstFT = t } - return pe.Join(ActionGenFastSeedFmp4, save(time.Second*time.Duration(t-firstFT), int64(totalRead-buff.Size()+index))) + if e := save(time.Second*time.Duration(t-firstFT), int64(totalRead-buff.Size()+index)); e != nil { + return pe.Join(ActionGenFastSeedFmp4, e) + } + return nil }); e != nil { return pe.Join(ActionGenFastSeedFmp4, ActionOneFFmp4, e) } else {