-
Notifications
You must be signed in to change notification settings - Fork 11
rendering failure with hardware decoder #1
Comments
|
[ImageReader-1440x960f4m1-31732-3] Failed to release buffer: Unknown error -1 (1) |
i have same error on it ! |
candidate patch? diff --git a/app/src/main/java/jp/yohhoy/heifreader/HeifReader.java b/app/src/main/java/jp/yohhoy/heifreader/HeifReader.java
index 364b12a..aca364e 100644
--- a/app/src/main/java/jp/yohhoy/heifreader/HeifReader.java
+++ b/app/src/main/java/jp/yohhoy/heifreader/HeifReader.java
@@ -368,6 +368,7 @@ public class HeifReader {
MediaCodec decoder = MediaCodec.createByCodecName(mDecoderName);
MediaFormat inputFormat = MediaFormat.createVideoFormat(
MediaFormat.MIMETYPE_VIDEO_HEVC, info.size.getWidth(), info.size.getHeight());
+ inputFormat.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Flexible);
inputFormat.setInteger(MediaFormat.KEY_MAX_INPUT_SIZE, maxInputSize);
inputFormat.setByteBuffer("csd-0", info.paramset);
Log.d(TAG, "HEVC input-format=" + inputFormat); |
Above patch doesn't work on Xperia X Performance. 😢 |
Xperia X Performance, Android 7.0
HeifReader#initialize
choose hardware decoder.MediaCodec output surface which format is 0x7fa30c06.
Galaxy S7 edge, Android 6.0.1 also report same error message.
The text was updated successfully, but these errors were encountered: