0XC00D1054

Windows Media Player NS_E_WMG_INVALIDSTATE fix

Media Player says it can't play a file because the graph state is wrong. Usually a codec mismatch or corrupted library cache.

What's actually happening here

NS_E_WMG_INVALIDSTATE (0XC00D1054) means Windows Media Player's internal playback graph — the pipeline that decodes and renders audio/video — is in a state where it can't accept the operation you're asking for. Usually that's "Play" or "Seek." The graph flipped to stopped or paused, but something left a lock or a stale reference behind.

I see this most often on Windows 10 (22H2) and Windows 11 (23H2) after a system update, or when you've installed a codec pack that didn't play nice. The player tries to use a DirectShow filter that's been registered wrong, or it finds a corrupted database entry pointing to a file that no longer exists.

The 30-second fix: Reset the library cache

This clears the corrupted database without touching your files. Open Windows Media Player. Hit ALT to show the menu bar if it's hidden. Go to Tools > Options > Library. Click "Remove deleted items from the library" — even if it's already checked, uncheck it, apply, then re-check it. Then click "Configure sharing" and hit "OK" all the way out.

Now close the player completely. Open it again. The player rebuilds the library index from scratch — that's why it works. The stale graph reference gets dumped.

Why this works: The library database is separate from the media files. When Windows Media Player loads a file whose database entry points to a filter that's been unregistered or replaced, the graph creation fails at the "find a renderer" step. Resetting the library forces it to re-query the system for available filters based on what's actually installed now.

The 5-minute fix: Re-register the Windows Media Player core components

If the library reset didn't cut it, the issue is in the DirectShow filter registration. Microsoft's own filters can get unregistered by third-party codec packs (hello, K-Lite). Here's how to fix that.

  1. Press Win + X, choose Windows Terminal (Admin) or Command Prompt (Admin).
  2. Run these commands one at a time. Wait for each to finish before the next:
regsvr32 wmp.dll
regsvr32 wmadmod.dll
regsvr32 wmasf.dll
regsvr32 wmnetmgr.dll
regsvr32 l3codecx.ax
regsvr32 mpg4ds32.ax

You'll get a pop-up for each saying registration succeeded. If any fail with a module not found, that's fine — it just means that specific filter isn't on your system. The important ones are wmp.dll and l3codecx.ax (the MP3 decoder).

Restart Windows Media Player. Try the file again.

Why this fixes it: Third-party installers sometimes unregister the built-in Microsoft codecs to "avoid conflicts." Except Windows Media Player expects those filters to be registered. When they're missing, the graph creation fails halfway — the source filter works, but the decoder filter doesn't, and the graph state goes invalid. Re-registering puts them back.

The 15+ minute fix: Clean codec stack + WMP reinstall

This is for when you've got multiple codec packs installed and the filter graph is a mess. The symptom: error on every file, not just one format.

  1. Uninstall every third-party codec pack you can find. Go to Settings > Apps > Installed apps. Remove K-Lite, CCCP, Shark007, any "codec pack" or "filter pack."
  2. Download and run DirectShow Filter Manager (it's free, from Softpedia or GitHub). Under Unregister, search for "wmp" and unregister anything that's not a Microsoft-signed filter. If you don't know what a filter does, leave it.
  3. Open PowerShell as Admin and run:
Get-AppxPackage *windows-media-player* | Remove-AppxPackage

Then reinstall it from the Microsoft Store or via Turn Windows features on or off: uncheck Media Features, reboot, check it again, reboot.

  1. Run the regsvr32 commands from the 5-minute fix again.
  2. Test with a simple file — a .wav or .mp3 you know works.

Why the nuclear option works: Codec packs tend to register multiple filters that claim to handle the same format. Windows Media Player's graph builder picks one based on merit scores. If the highest-merit filter is a third-party one that's buggy or incomplete, the graph initializes but goes invalid the moment it tries to process a packet. Stripping all third-party filters resets the merit system back to defaults. Reinstalling Windows Media Player also resets its internal state — including any corrupted registry keys under HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer.

When none of this works

If you're still seeing 0XC00D1054 after all three steps, the file itself is likely broken. Try playing it in VLC or MPC-HC — both use their own internal decoders and ignore the system DirectShow filter graph entirely. If it plays in VLC but not in WMP, the file uses a codec that's simply not supported by Windows Media Player natively (like HEVC without the extension, or FLAC with certain container flags).

For that scenario: install the HEIF Image Extensions and HEVC Video Extensions from the Microsoft Store. Or just use VLC — honestly, it's less of a headache.

Related Errors in Windows Errors
0X400D006E NS_I_LOGGING_FAILED 0X400D006E Fix 0XC01A0015 STATUS_LOG_POLICY_NOT_INSTALLED (0XC01A0015) Fix 0X00000A83 Fix 0X00000A83: Machine Already Joined to Domain 0XC00D1236 Fix NS_E_PDA_FAILED_TO_SYNCHRONIZE_FILE (0XC00D1236) in Windows Media Player

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.