Critical MediaCodec Bug: DynamicANWBuffer Error -1010 Affects Multiple Unity Video Plugins

Magic Leap OS Version: 1.12.0

Device: Magic Leap 2

Unity Version: 2022.3.54.f1

Affected Plugins: Vuplex WebView, AVPro 3 Video Player

Problem Description

Hi Magic Leap team,

I hope this message finds you well. I’m a Unity developer currently working on an AR application for Magic Leap 2, and I was hoping you might be able to help me with a video playback challenge I’ve encountered.

I’m working to integrate video content into my app, including both web-based videos (through Vuplex WebView) and local video files (through AVPro Video Player). Unfortunately, I’ve been experiencing consistent MediaCodec errors with both of these commercial plugins, which has made it difficult to implement them reliably in my project.

Interestingly, Unity’s built-in Video Player works perfectly with the same video files, which suggests that the Magic Leap 2 hardware handles video decoding well. This makes me wonder if there might be something specific about how third-party MediaCodec implementations interact with the system.

I’ve invested quite a bit of time troubleshooting this issue and noticed that both Vuplex and AVPro encounter the same error pattern, which leads me to believe this might be a system-level consideration rather than something specific to either plugin.

I’d really appreciate any guidance you might have, as I’m hoping to leverage the advanced features these plugins offer (such as web video integration and enhanced format support) rather than being limited to Unity’s basic Video Player.

Thank you so much for your time and any insights you might be able to share. I really appreciate the work you’re doing with the Magic Leap platform

Error Details

Primary Error:

ACodec [OMX.mesa.video_decoder.avc] setPortMode on output to DynamicANWBuffer failed w/ err -1010
ACodec [OMX.mesa.video_decoder.vp9] setPortMode on output to DynamicANWBuffer failed w/ err -1010

Error Code: -1010 (INVALID_OPERATION)

Affected Components:

  • OMX.mesa.video_decoder.avc (H.264 hardware decoder)
  • OMX.mesa.video_decoder.vp9 (VP9 hardware decoder)
  • DynamicANWBuffer allocation system

Video Example:

https://filesamples.com/samples/video/mp4/sample_640x360.mp4
https://filesamples.com/samples/video/webm/sample_640x360.webm
https://ia800207.us.archive.org/15/items/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.mp4

Reproduction Steps

  1. Create Unity project with Vuplex WebView OR AVPro 3 Video Player
  2. Attempt to play H.264 MP4 or VP9 WebM video
  3. Observe MediaCodec initialization
  4. Error occurs during setPortMode on output to DynamicANWBuffer
  5. Video displays artifacts

Affected Plugins with Identical Error

Vuplex WebView:

2025/06/30 11:09:42.194 Error ACodec [OMX.mesa.video_decoder.vp9] setPortMode on output to DynamicANWBuffer failed w/ err -1010

AVPro 3 Video Player:

2025/05/15 15:45:07.927 Error ACodec [OMX.mesa.video_decoder.avc] setPortMode on output to DynamicANWBuffer failed w/ err -1010

:white_check_mark: Working:

  • Unity Video Player

:cross_mark: Broken:

  • Vuplex WebView (Chromium MediaCodec bridge)
  • AVPro Video Player (direct MediaCodec usage)

Hey @oleksii.kryzhanovskyi ,

I’m sorry to hear that you’re having issues with these plug-ins. There is an outstanding bug with the webRTC library upstream that can cause this type of issue. It is specific to x86_64 Android.

That said, if you try a default video like Big Buck Bunny that is not vp9 does it play correctly? Does the same video play correctly when you open the video in your file browser on the Magic Leap 2? Does it run properly when you run it on the system web browser?

Hello, thanks for reply

“If you try a default video like Big Buck Bunny that is not VP9, does it play correctly?" - I need more time to test different video formats. I will reply to you later.

“Does the same video play correctly when you open the video in your file browser on the Magic Leap 2?” - I got a notification saying “Access this file via Magic Leap Hub.”

“Does it run properly when you run it on the system web browser?” - Yes, the system web browser works, as does the Unity Video Player

1 Like

Thank you for that information. Let me know if you get a chance to try a video like the following :

https://download.blender.org/peach/bigbuckbunny_movies/
https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4