From 755a37f775f97b3714a8899f114a641b975133b5 Mon Sep 17 00:00:00 2001 From: Oleksandr Shyshatskyi Date: Thu, 12 Mar 2026 14:55:07 +0200 Subject: [PATCH] fix: resolve CRI Mana video crash from thread-unsafe API calls The Scaleform video integration was ported from an older CRI Movie SDK where Scaleform managed decode threading itself. CRI Mana 2019 uses CRIMANA_THREAD_MODEL_MULTI by default, creating its own internal decode thread. The existing VideoDecoderThrd was calling criManaPlayer_ExecuteMain() from a second background thread, racing with both CRI's internal thread and the main thread's criMana_ExecuteMain() (which already calls criManaPlayer_ExecuteMain internally for all handles). Per CRI docs, criManaPlayer_ExecuteMain is "not thread safe" and "there is no need to execute it" when criMana_ExecuteMain is called. This produced the crash sequence: CRI-MW ERROR: Can't exec criMvPly_PutInputChunk() before AllocateWorkBuffer CRI-MW ERROR: Decoder core error VideoMovieClip internal error: