]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Fix genFastSeedErr (#169)
authorqydysky <qydysky@foxmail.com>
Sun, 16 Feb 2025 12:55:56 +0000 (20:55 +0800)
committerGitHub <noreply@github.com>
Sun, 16 Feb 2025 12:55:56 +0000 (20:55 +0800)
Reply/flvDecode.go
Reply/fmp4Decode.go

index e2840f766faecb055c6476f1f16537bedeb96f2b..881f0f1893ab56272b800a0046d09eb3f8082603 100644 (file)
@@ -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 {
index 27923ab5c8bbe5c50d409f0d29b92098345884e4..667769c1131151347e3d2f81641fb9250be419f4 100644 (file)
@@ -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 {