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

**URL:** <https://forum.magicleap.cloud/t/critical-mediacodec-bug-dynamicanwbuffer-error-1010-affects-multiple-unity-video-plugins/5972>\
**Category:** General\
**Tags:** webview, unity, openxr, mrtk3\
**Created:** [June 30, 2025, 3:31pm UTC](https://forum.magicleap.cloud/t/critical-mediacodec-bug-dynamicanwbuffer-error-1010-affects-multiple-unity-video-plugins/5972 "2025-06-30T15:31:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![oleksii.kryzhanovskyi](https://avatars.discourse-cdn.com/v4/letter/o/c89c15/32.png) [@oleksii.kryzhanovskyi](https://forum.magicleap.cloud/u/oleksii.kryzhanovskyi)\
**Post date:** [June 30, 2025, 3:31pm UTC](https://forum.magicleap.cloud/t/critical-mediacodec-bug-dynamicanwbuffer-error-1010-affects-multiple-unity-video-plugins/5972/1 "2025-06-30T15:31:31Z")

</div>

**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:**

```auto
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:**

```auto
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:**

```auto
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:**

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

```

### **✅ Working:**

- **Unity Video Player**

### **❌ Broken:**

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

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [August 22, 2025, 12:39am UTC](https://forum.magicleap.cloud/t/critical-mediacodec-bug-dynamicanwbuffer-error-1010-affects-multiple-unity-video-plugins/5972/2 "2025-08-22T00:39:03Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![oleksii.kryzhanovskyi](https://avatars.discourse-cdn.com/v4/letter/o/c89c15/32.png) [@oleksii.kryzhanovskyi](https://forum.magicleap.cloud/u/oleksii.kryzhanovskyi)\
**Post date:** [August 22, 2025, 5:28pm UTC](https://forum.magicleap.cloud/t/critical-mediacodec-bug-dynamicanwbuffer-error-1010-affects-multiple-unity-video-plugins/5972/3 "2025-08-22T17:28:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [August 22, 2025, 8:43pm UTC](https://forum.magicleap.cloud/t/critical-mediacodec-bug-dynamicanwbuffer-error-1010-affects-multiple-unity-video-plugins/5972/4 "2025-08-22T20:43:29Z")

</div>

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

```auto
https://download.blender.org/peach/bigbuckbunny_movies/

```

```auto
https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4

```

---

<div class="post-metadata">

**Author:** ![oleksii.kryzhanovskyi](https://avatars.discourse-cdn.com/v4/letter/o/c89c15/32.png) [@oleksii.kryzhanovskyi](https://forum.magicleap.cloud/u/oleksii.kryzhanovskyi)\
**Post date:** [October 2, 2025, 3:59pm UTC](https://forum.magicleap.cloud/t/critical-mediacodec-bug-dynamicanwbuffer-error-1010-affects-multiple-unity-video-plugins/5972/5 "2025-10-02T15:59:03Z")

</div>

Hello, sorry for the long reply

Loggs for this video [https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4](https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4)  
It works but with artifacts. All good with sound, but visually it’s a mess

[Loggs1.txt](https://forum.magicleap.cloud/uploads/short-url/AqHbm3mue3u8wGA5A2mh8El9i92.txt) (106.5 KB)

---

<div class="post-metadata">

**Author:** ![oleksii.kryzhanovskyi](https://avatars.discourse-cdn.com/v4/letter/o/c89c15/32.png) [@oleksii.kryzhanovskyi](https://forum.magicleap.cloud/u/oleksii.kryzhanovskyi)\
**Post date:** [October 2, 2025, 4:02pm UTC](https://forum.magicleap.cloud/t/critical-mediacodec-bug-dynamicanwbuffer-error-1010-affects-multiple-unity-video-plugins/5972/6 "2025-10-02T16:02:14Z")

</div>

This video [https://download.blender.org/peach/bigbuckbunny\_movies/](https://download.blender.org/peach/bigbuckbunny_movies/)doesn’t launch. Because of unsupported codec.

[Loggs2.txt](https://forum.magicleap.cloud/uploads/short-url/klYDTMASUMb0B2Ppan414sji11Q.txt) (105.2 KB)

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [October 6, 2025, 2:15pm UTC](https://forum.magicleap.cloud/t/critical-mediacodec-bug-dynamicanwbuffer-error-1010-affects-multiple-unity-video-plugins/5972/7 "2025-10-06T14:15:36Z")

</div>

Interesting. So I looked at our local tests and those are working “fine” . Can you try playing the video using the system web browser or maybe a simple 2D Android application like Firefox?

Comparing your tests to the test results from our QA team, I wonder if the issue is the implementation of the plugin itself or a different upstream issue.

You could also try downloading an older version of the Magic Leap 2 Unity Examples project which include an MLSDK version of Webview. While that web view is deprecated, I wonder if the results would be any different.
