From 59284123ac001a85abadd237c17e148b6ad88f15 Mon Sep 17 00:00:00 2001 From: qydysky Date: Sun, 16 Feb 2025 20:55:56 +0800 Subject: [PATCH] Fix genFastSeedErr (#169) --- Reply/flvDecode.go | 5 ++++- Reply/fmp4Decode.go | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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 { -- 2.39.2