9 Sep
2025
9 Sep
'25
7:42 a.m.
Rémi Bernon (@rbernon) commented about dlls/windows.media.playback.backgroundmediaplayer/main.c:
{ struct background_media_player_statics *impl = impl_from_IActivationFactory( iface ); ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + + if (!ref) + if (impl->media_player) IMediaPlayer_Release( impl->media_player );
if (!ref)
{
if (impl->media_player) IMediaPlayer_Release( impl->media_player );
impl->media_player = NULL;
}
We need to reset the factory to its initial state if we want to keep it statically allocated. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8937#note_115422