Skip to content

Commit 895d58e

Browse files
committed
Animated bugfix
1 parent d7efa62 commit 895d58e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

avif-coder/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ afterEvaluate {
4242
create<MavenPublication>("mavenJava") {
4343
groupId = "com.github.awxkee"
4444
artifactId = "avif-coder"
45-
version = "1.6.4"
45+
version = "2.0.1"
4646
from(components["release"])
4747
// artifact("androidSourcesJar")
4848
}

avif-coder/src/main/java/com/radzivon/bartoshyk/avif/coder/AvifAnimatedDecoder.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828

2929
package com.radzivon.bartoshyk.avif.coder
3030

31+
import android.annotation.SuppressLint
3132
import android.graphics.Bitmap
33+
import android.os.Build
3234
import android.util.Size
3335
import androidx.annotation.Keep
3436
import java.io.Closeable
@@ -43,8 +45,15 @@ import java.nio.ByteBuffer
4345
* @throws Exception - All functions in this class may throw if something goes wrong
4446
*/
4547
@Keep
48+
@SuppressLint("ObsoleteSdkInt")
4649
class AvifAnimatedDecoder : Closeable {
4750

51+
init {
52+
if (Build.VERSION.SDK_INT >= 24) {
53+
System.loadLibrary("coder")
54+
}
55+
}
56+
4857
constructor(source: ByteArray) {
4958
nativeController = createControllerFromByteArray(source)
5059
}

0 commit comments

Comments
 (0)