diff options
| author | Bond_009 <bond.009@outlook.com> | 2023-09-23 15:12:12 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2023-09-23 15:15:58 +0200 |
| commit | afc195286ff3cc0e08d51d75d3031e17108b495d (patch) | |
| tree | 25414e06955843c1358a24f4d0059d52afb3c60a /src/Jellyfin.Drawing.Skia/SkiaHelper.cs | |
| parent | eb5f76a4470994ba1aaab4eb64b1d40f96a202d6 (diff) | |
Start adding IDisposableAnalyzers to projects
Diffstat (limited to 'src/Jellyfin.Drawing.Skia/SkiaHelper.cs')
| -rw-r--r-- | src/Jellyfin.Drawing.Skia/SkiaHelper.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Jellyfin.Drawing.Skia/SkiaHelper.cs b/src/Jellyfin.Drawing.Skia/SkiaHelper.cs index 00d224da9..bd1b2b0da 100644 --- a/src/Jellyfin.Drawing.Skia/SkiaHelper.cs +++ b/src/Jellyfin.Drawing.Skia/SkiaHelper.cs @@ -19,7 +19,6 @@ public static class SkiaHelper public static SKBitmap? GetNextValidImage(SkiaEncoder skiaEncoder, IReadOnlyList<string> paths, int currentIndex, out int newIndex) { var imagesTested = new Dictionary<int, int>(); - SKBitmap? bitmap = null; while (imagesTested.Count < paths.Count) { @@ -28,7 +27,7 @@ public static class SkiaHelper currentIndex = 0; } - bitmap = skiaEncoder.Decode(paths[currentIndex], false, null, out _); + SKBitmap? bitmap = skiaEncoder.Decode(paths[currentIndex], false, null, out _); imagesTested[currentIndex] = 0; @@ -36,11 +35,12 @@ public static class SkiaHelper if (bitmap is not null) { - break; + newIndex = currentIndex; + return bitmap; } } newIndex = currentIndex; - return bitmap; + return null; } } |
