Fix animated

This commit is contained in:
tarsin committed 2022-07-25 09:28:40 +08:00
1 parent 500163fe1a
commit 80a20f25b9
7 files changed
+38 -66

No files matched your search

@@ -239,7 +239,7 @@ public class ImageTexture implements Texture, Animatable {
}
boolean end = mReleased.get() || mImage.isImageRecycled() || mNeedRelease.get() ||
(mImage.isCompleted() && mImage.getFrameCount() <= 1) || mRunning.get();
(mImage.isCompleted() && mImage.getFormat() == 0) || mRunning.get();
synchronized (mImage) {
mImageBusy = false;
@@ -609,13 +609,11 @@ public class ImageTexture implements Texture, Animatable {
sPVLock.v();
}
int frameCount = mImage.getFrameCount();
synchronized (mImage) {
// Release image
mImageBusy = false;
// Check need release, frameCount <= 1
if (mNeedRelease.get() || frameCount <= 1) {
if (mNeedRelease.get() || mImage.getFormat() == 0) {
mAnimateRunnable = null;
return;
}