Error while configuring MediaCodec for HEVC video decoding #1542 #1669

Closed
opened 2026-02-21 00:01:24 -05:00 by deekerman · 1 comment
Owner

Originally created by @Kayuii on GitHub (Apr 17, 2023).

Bug Description

I encountered an issue while trying to configure MediaCodec for HEVC video decoding. Below is the error log:

04-17 11:56:26.388 D/MediaCodecList(28645): codecHandlesFormat: no format, so no extra checks
04-17 11:56:26.390 D/MediaCodecList(28645): codecHandlesFormat: no format, so no extra checks
04-17 11:56:26.399 I/OMXClient(28645): IOmx service obtained
04-17 11:56:26.401 I/flutter (28645): _globalFFI init
04-17 11:56:26.402 D/ffi     (28645): hbb_common::config: Configuration path: /data/user/0/com.carriez.flutter_hbb/app_flutter/RustDesk_local.toml
04-17 11:56:26.404 I/flutter (28645): _globalFFI init end
04-17 11:56:26.406 I/flutter (28645): flutter got android msg,on_state_changed,{name: input, value: false}
04-17 11:56:26.406 I/flutter (28645): from jvm:on_state_changed,input:false
04-17 11:56:26.406 I/flutter (28645): changeStatue value false
04-17 11:56:26.417 W/OMXUtils(28645): cannot describe color format 0x13 = 19 with stride=0 and sliceHeight=0
04-17 11:56:26.417 E/ACodec  (28645): Wrong cropped rect (0, 0, 0, 0) vs. frame (0, 0)
04-17 11:56:26.417 E/ACodec  (28645): [OMX.allwinner.video.decoder.avc] configureCodec returning error -22
04-17 11:56:26.417 E/ACodec  (28645): signalError(omxError 0x80001001, internalError -22)
04-17 11:56:26.418 E/MediaCodec(28645): Codec reported err 0xffffffea, actionCode 0, while in state 3/CONFIGURING
04-17 11:56:26.419 E/MediaCodec(28645): configure failed with err 0xffffffea, resetting...
04-17 11:56:26.426 I/OMXClient(28645): IOmx service obtained
04-17 11:56:26.436 I/flutter (28645): registerEventHandler callback_query_onlines recent peer
04-17 11:56:26.436 I/flutter (28645): registerEventHandler load_recent_peers recent peer
04-17 11:56:26.436 D/ffi     (28645): hbb_common::config: Configuration path: /data/user/0/com.carriez.flutter_hbb/app_flutter/RustDesk.toml
04-17 11:56:26.437 D/ffi     (28645): hbb_common::config: Configuration path: /data/user/0/com.carriez.flutter_hbb/app_flutter/RustDesk.toml
04-17 11:56:26.438 E/NdkMediaCodec(28645): configure: err(-22), failed with format: AMessage(what = 'conf', target = 1) = {
04-17 11:56:26.438 E/NdkMediaCodec(28645):   string mime = "video/avc"
04-17 11:56:26.438 E/NdkMediaCodec(28645):   int32_t width = 0
04-17 11:56:26.438 E/NdkMediaCodec(28645):   int32_t height = 0
04-17 11:56:26.438 E/NdkMediaCodec(28645):   int64_t color-format = 19
04-17 11:56:26.438 E/NdkMediaCodec(28645):   int32_t flags = 0
04-17 11:56:26.438 E/NdkMediaCodec(28645): }
04-17 11:56:26.438 E/NdkMediaCodec(28645): sf error code: -22
04-17 11:56:26.443 I/BpBinder(28645): onLastStrongRef automatically unlinking death recipients: android.media.IResourceManagerService
04-17 11:56:26.449 D/MediaCodecList(28645): codecHandlesFormat: no format, so no extra checks
04-17 11:56:26.450 D/MediaCodecList(28645): codecHandlesFormat: no format, so no extra checks
04-17 11:56:26.453 I/OMXClient(28645): IOmx service obtained
04-17 11:56:26.466 W/OMXUtils(28645): cannot describe color format 0x13 = 19 with stride=0 and sliceHeight=0
04-17 11:56:26.467 E/ACodec  (28645): Wrong cropped rect (0, 0, 0, 0) vs. frame (0, 0)
04-17 11:56:26.467 E/ACodec  (28645): [OMX.allwinner.video.decoder.hevc] configureCodec returning error -22
04-17 11:56:26.467 E/ACodec  (28645): signalError(omxError 0x80001001, internalError -22)
04-17 11:56:26.467 E/MediaCodec(28645): Codec reported err 0xffffffea, actionCode 0, while in state 3/CONFIGURING
04-17 11:56:26.467 E/MediaCodec(28645): configure failed with err 0xffffffea, resetting...
04-17 11:56:26.474 I/OMXClient(28645): IOmx service obtained
04-17 11:56:26.486 E/NdkMediaCodec(28645): configure: err(-22), failed with format: AMessage(what = 'conf', target = 6) = {
04-17 11:56:26.486 E/NdkMediaCodec(28645):   string mime = "video/hevc"
04-17 11:56:26.486 E/NdkMediaCodec(28645):   int32_t width = 0
04-17 11:56:26.486 E/NdkMediaCodec(28645):   int32_t height = 0
04-17 11:56:26.486 E/NdkMediaCodec(28645):   int64_t color-format = 19
04-17 11:56:26.486 E/NdkMediaCodec(28645):   int32_t flags = 0
04-17 11:56:26.486 E/NdkMediaCodec(28645): }
04-17 11:56:26.486 E/NdkMediaCodec(28645): sf error code: -22
04-17 11:56:26.491 I/BpBinder(28645): onLastStrongRef automatically unlinking death recipients: android.media.IResourceManagerService
04-17 11:56:26.551 I/Gralloc4(28645): mapper 4.x is not supported
04-17 11:56:26.552 W/Gralloc3(28645): mapper 3.x is not supported
04-17 11:56:26.556 E/gralloc (28645): Arm Module v1.0
04-17 11:56:26.558 W/Gralloc4(28645): allocator 4.x is not supported
04-17 11:56:26.558 W/Gralloc3(28645): allocator 3.x is not supported
04-17 11:56:26.572 E/ion     (28645): ioctl c0044901 failed with code -1: Inappropriate ioctl for device
04-17 11:56:29.695 D/ffi     (28645): hbb_common::udp: Receive buf size of udp 0.0.0.0:0: Ok(229376)
04-17 11:56:31.731 D/ffi     (28645): hbb_common::config: Configuration path: /data/user/0/com.carriez.flutter_hbb/app_flutter/RustDesk_default.toml
04-17 11:56:31.739 I/flutter (28645): CustomTouchGestureRecognizer init
04-17 11:56:31.798 D/MediaCodecList(28645): codecHandlesFormat: no format, so no extra checks
04-17 11:56:31.800 D/MediaCodecList(28645): codecHandlesFormat: no format, so no extra checks
04-17 11:56:31.815 I/OMXClient(28645): IOmx service obtained

How to Reproduce

I am experiencing an issue where the application uses HWCodec on Windows and MediaCodec on Android. However, after connecting, it appears to be using VP9 software decoding instead of hardware encoding.

Step 1: Set up the application to use HWCodec on Windows and MediaCodec on Android
Step 2: Connect the devices or applications
Step 3: Observe the decoding process

Expected Behavior

I expected the MediaCodec to be configured successfully for HEVC video decoding without any errors. The decoding process should start as intended and perform efficiently.

I would appreciate it if you could provide information on the testing environment you used, including the operating system, device model, compiler version, etc., so that I can reproduce the successful execution state in my environment.

Operating system(s) on local side and remote side

Android 12 -> windows 10

RustDesk Version(s) on local side and remote side

master -> master

Screenshots

**

Additional Context

No response

Originally created by @Kayuii on GitHub (Apr 17, 2023). ### Bug Description I encountered an issue while trying to configure MediaCodec for HEVC video decoding. Below is the error log: ``` 04-17 11:56:26.388 D/MediaCodecList(28645): codecHandlesFormat: no format, so no extra checks 04-17 11:56:26.390 D/MediaCodecList(28645): codecHandlesFormat: no format, so no extra checks 04-17 11:56:26.399 I/OMXClient(28645): IOmx service obtained 04-17 11:56:26.401 I/flutter (28645): _globalFFI init 04-17 11:56:26.402 D/ffi (28645): hbb_common::config: Configuration path: /data/user/0/com.carriez.flutter_hbb/app_flutter/RustDesk_local.toml 04-17 11:56:26.404 I/flutter (28645): _globalFFI init end 04-17 11:56:26.406 I/flutter (28645): flutter got android msg,on_state_changed,{name: input, value: false} 04-17 11:56:26.406 I/flutter (28645): from jvm:on_state_changed,input:false 04-17 11:56:26.406 I/flutter (28645): changeStatue value false 04-17 11:56:26.417 W/OMXUtils(28645): cannot describe color format 0x13 = 19 with stride=0 and sliceHeight=0 04-17 11:56:26.417 E/ACodec (28645): Wrong cropped rect (0, 0, 0, 0) vs. frame (0, 0) 04-17 11:56:26.417 E/ACodec (28645): [OMX.allwinner.video.decoder.avc] configureCodec returning error -22 04-17 11:56:26.417 E/ACodec (28645): signalError(omxError 0x80001001, internalError -22) 04-17 11:56:26.418 E/MediaCodec(28645): Codec reported err 0xffffffea, actionCode 0, while in state 3/CONFIGURING 04-17 11:56:26.419 E/MediaCodec(28645): configure failed with err 0xffffffea, resetting... 04-17 11:56:26.426 I/OMXClient(28645): IOmx service obtained 04-17 11:56:26.436 I/flutter (28645): registerEventHandler callback_query_onlines recent peer 04-17 11:56:26.436 I/flutter (28645): registerEventHandler load_recent_peers recent peer 04-17 11:56:26.436 D/ffi (28645): hbb_common::config: Configuration path: /data/user/0/com.carriez.flutter_hbb/app_flutter/RustDesk.toml 04-17 11:56:26.437 D/ffi (28645): hbb_common::config: Configuration path: /data/user/0/com.carriez.flutter_hbb/app_flutter/RustDesk.toml 04-17 11:56:26.438 E/NdkMediaCodec(28645): configure: err(-22), failed with format: AMessage(what = 'conf', target = 1) = { 04-17 11:56:26.438 E/NdkMediaCodec(28645): string mime = "video/avc" 04-17 11:56:26.438 E/NdkMediaCodec(28645): int32_t width = 0 04-17 11:56:26.438 E/NdkMediaCodec(28645): int32_t height = 0 04-17 11:56:26.438 E/NdkMediaCodec(28645): int64_t color-format = 19 04-17 11:56:26.438 E/NdkMediaCodec(28645): int32_t flags = 0 04-17 11:56:26.438 E/NdkMediaCodec(28645): } 04-17 11:56:26.438 E/NdkMediaCodec(28645): sf error code: -22 04-17 11:56:26.443 I/BpBinder(28645): onLastStrongRef automatically unlinking death recipients: android.media.IResourceManagerService 04-17 11:56:26.449 D/MediaCodecList(28645): codecHandlesFormat: no format, so no extra checks 04-17 11:56:26.450 D/MediaCodecList(28645): codecHandlesFormat: no format, so no extra checks 04-17 11:56:26.453 I/OMXClient(28645): IOmx service obtained 04-17 11:56:26.466 W/OMXUtils(28645): cannot describe color format 0x13 = 19 with stride=0 and sliceHeight=0 04-17 11:56:26.467 E/ACodec (28645): Wrong cropped rect (0, 0, 0, 0) vs. frame (0, 0) 04-17 11:56:26.467 E/ACodec (28645): [OMX.allwinner.video.decoder.hevc] configureCodec returning error -22 04-17 11:56:26.467 E/ACodec (28645): signalError(omxError 0x80001001, internalError -22) 04-17 11:56:26.467 E/MediaCodec(28645): Codec reported err 0xffffffea, actionCode 0, while in state 3/CONFIGURING 04-17 11:56:26.467 E/MediaCodec(28645): configure failed with err 0xffffffea, resetting... 04-17 11:56:26.474 I/OMXClient(28645): IOmx service obtained 04-17 11:56:26.486 E/NdkMediaCodec(28645): configure: err(-22), failed with format: AMessage(what = 'conf', target = 6) = { 04-17 11:56:26.486 E/NdkMediaCodec(28645): string mime = "video/hevc" 04-17 11:56:26.486 E/NdkMediaCodec(28645): int32_t width = 0 04-17 11:56:26.486 E/NdkMediaCodec(28645): int32_t height = 0 04-17 11:56:26.486 E/NdkMediaCodec(28645): int64_t color-format = 19 04-17 11:56:26.486 E/NdkMediaCodec(28645): int32_t flags = 0 04-17 11:56:26.486 E/NdkMediaCodec(28645): } 04-17 11:56:26.486 E/NdkMediaCodec(28645): sf error code: -22 04-17 11:56:26.491 I/BpBinder(28645): onLastStrongRef automatically unlinking death recipients: android.media.IResourceManagerService 04-17 11:56:26.551 I/Gralloc4(28645): mapper 4.x is not supported 04-17 11:56:26.552 W/Gralloc3(28645): mapper 3.x is not supported 04-17 11:56:26.556 E/gralloc (28645): Arm Module v1.0 04-17 11:56:26.558 W/Gralloc4(28645): allocator 4.x is not supported 04-17 11:56:26.558 W/Gralloc3(28645): allocator 3.x is not supported 04-17 11:56:26.572 E/ion (28645): ioctl c0044901 failed with code -1: Inappropriate ioctl for device 04-17 11:56:29.695 D/ffi (28645): hbb_common::udp: Receive buf size of udp 0.0.0.0:0: Ok(229376) 04-17 11:56:31.731 D/ffi (28645): hbb_common::config: Configuration path: /data/user/0/com.carriez.flutter_hbb/app_flutter/RustDesk_default.toml 04-17 11:56:31.739 I/flutter (28645): CustomTouchGestureRecognizer init 04-17 11:56:31.798 D/MediaCodecList(28645): codecHandlesFormat: no format, so no extra checks 04-17 11:56:31.800 D/MediaCodecList(28645): codecHandlesFormat: no format, so no extra checks 04-17 11:56:31.815 I/OMXClient(28645): IOmx service obtained ``` ### How to Reproduce I am experiencing an issue where the application uses HWCodec on Windows and MediaCodec on Android. However, after connecting, it appears to be using VP9 software decoding instead of hardware encoding. Step 1: Set up the application to use HWCodec on Windows and MediaCodec on Android Step 2: Connect the devices or applications Step 3: Observe the decoding process ### Expected Behavior I expected the MediaCodec to be configured successfully for HEVC video decoding without any errors. The decoding process should start as intended and perform efficiently. I would appreciate it if you could provide information on the testing environment you used, including the operating system, device model, compiler version, etc., so that I can reproduce the successful execution state in my environment. ### Operating system(s) on local side and remote side Android 12 -> windows 10 ### RustDesk Version(s) on local side and remote side master -> master ### Screenshots ** ### Additional Context _No response_
deekerman 2026-02-21 00:01:24 -05:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@rustdesk commented on GitHub (Apr 17, 2023):

#763

@rustdesk commented on GitHub (Apr 17, 2023): #763
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rustdesk-rustdesk#1669
No description provided.