Kaynağa Gözat

Merge pull request #11109 from crobibero/animated-webp

Don't decode animated images
Bond-009 1 yıl önce
ebeveyn
işleme
9818456d9e
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      src/Jellyfin.Drawing.Skia/SkiaEncoder.cs

+ 5 - 0
src/Jellyfin.Drawing.Skia/SkiaEncoder.cs

@@ -263,6 +263,11 @@ public class SkiaEncoder : IImageEncoder
                 return null;
             }
 
+            if (codec.FrameCount != 0)
+            {
+                throw new ArgumentException("Cannot decode images with multiple frames");
+            }
+
             // create the bitmap
             var bitmap = new SKBitmap(codec.Info.Width, codec.Info.Height, !requiresTransparencyHack);