diff --git a/TwitchDownloaderCore/VideoDownloader.cs b/TwitchDownloaderCore/VideoDownloader.cs index 785a14c7..acc733db 100644 --- a/TwitchDownloaderCore/VideoDownloader.cs +++ b/TwitchDownloaderCore/VideoDownloader.cs @@ -493,10 +493,9 @@ private Range GetStreamListTrim(IList streamList, VideoInfo videoIn var videoPart = streamList[i]; if (endTime - videoPart.PartInfo.Duration < trimTotalSeconds) { - if (endTime - trimTotalSeconds > 0) - { - endOffset = videoPart.PartInfo.Duration - (endTime - trimTotalSeconds); - } + var offset = endTime - trimTotalSeconds; + if (offset > 0) endOffset = videoPart.PartInfo.Duration - offset; + break; }