On Wed, 6 Aug 2025 at 09:13, Balázs Varga <balazs.varga...@gmail.com> wrote:

> we make these calls and we  InitializeWindow, so we create a
> MFPCreateMediaPlayer, CreateMediaItemFromURL with the tmp media file
> (avi): file:///C:/cygwin64/tmp/tesB70A.tmp,
> which methods (CreateMediaItemFromURL) completes asynchronously. When it
> does, MFPlay sends an MFP_EVENT_TYPE_MEDIAITEM_CREATED event, but before it
> could have finished,
> we dispose and Clear everything (also hwnd windows) related to
> MediaWindow/Player and I guess this happened (second call stack)
> MFPlay.dll!CMFPInnerPlayer::NotifyMediaItemCreatedEvent(struct
> IMFAsyncResult *) Unknown
>
>>
>>
Probably the Player object, inside its dispose() method, or its destructor,
needs to wait until the CreateMediaItemFromURL call completes.
We do similar stuff for child threads and asynchronous vcl PostUserEvent
callbacks.

Reply via email to