From b197f71476057b0e523c7d2bc953843aef0c42c9 Mon Sep 17 00:00:00 2001 From: qydysky Date: Sun, 17 Nov 2024 02:13:24 +0800 Subject: [PATCH] =?utf8?q?Improve=20=E4=BC=98=E5=8C=96=E5=88=87=E7=89=87?= =?utf8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Reply/flvDecode.go | 4 ++-- Reply/fmp4Decode.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Reply/flvDecode.go b/Reply/flvDecode.go index 8fbea69..7f99a71 100644 --- a/Reply/flvDecode.go +++ b/Reply/flvDecode.go @@ -290,8 +290,8 @@ func (t *FlvDecoder) Cut(reader io.Reader, startT, duration time.Duration, w io. firstFT = t } cu := int64(t - firstFT) - over = cu <= durationM+startTM - if startTM <= cu && over { + over = cu > durationM+startTM + if startTM <= cu && !over { return true } return false diff --git a/Reply/fmp4Decode.go b/Reply/fmp4Decode.go index f4847f0..8596615 100644 --- a/Reply/fmp4Decode.go +++ b/Reply/fmp4Decode.go @@ -698,8 +698,8 @@ func (t *Fmp4Decoder) Cut(reader io.Reader, startT, duration time.Duration, w io firstFT = t } cu := t - firstFT - over = cu <= durationM+startTM - if startTM <= cu && over { + over = cu > durationM+startTM + if startTM <= cu && !over { return true } return false -- 2.39.2