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 );
```suggestion:-1+0 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.