You're trying to play a photo in Windows Media Player — maybe a slideshow from a client's thumb drive, maybe your own wedding pics — and WMP slams you with NS_E_WMP_JPG_UNEXPECTED_ENDOFFILE (0xC00D103D). Translation: the JPEG is cut off. WMP hit the end of the data mid-frame and gave up.
I had a client last month — small dental office, Windows 10 Pro, WMP 12 — whose front-desk slideshow died on one image. Turned out the receptionist unplugged a USB drive mid-copy from her camera. Every photo after that point was half-written. That's the classic trigger: interrupted transfers, bad SD cards, email attachments that got truncated, or a browser download that got killed at 98%.
Work through these in order. Stop when it works.
Step 1 — The 30-second test: is the file actually broken?
Before you touch WMP, prove whether the JPEG itself is corrupt. Open the file in Photos (the modern Windows app), Paint, or any browser. If none of them can render it, the file is dead. No WMP setting will bring it back.
Quick checks:
- Right-click the file → Properties. If it's 0 KB, or suspiciously tiny (a 4 MB photo showing as 12 KB), the copy was interrupted.
- Try opening it in Chrome or Edge. Browsers are forgiving — if Chrome chokes too, the file is genuinely truncated.
- Look at the file header with a hex editor or PowerShell. A valid JPEG starts with
FF D8 FFand ends withFF D9. If the last two bytes aren'tFF D9, it's cut off.
# Run in PowerShell — checks if the last bytes are FF D9
$bytes = [System.IO.File]::ReadAllBytes("C:\path\to\image.jpg")
$lastTwo = $bytes[-2..-1] | ForEach-Object { $_.ToString("X2") }
$lastTwo -join ' ' # Healthy JPEGs end with: FF D9
If you get FF D9, the file is fine and the problem is WMP's library. Skip to Step 2. If you don't, the file is truncated — jump to Step 3.
Step 2 — The 5-minute fix: clear the WMP library cache
WMP indexes every media file it touches. When a JPEG gets corrupted, WMP sometimes keeps a stale entry pointing at the broken file, and it'll throw 0xC00D103D over and over even after you've replaced the image. The fix is to nuke the library database and let WMP rebuild.
- Close Windows Media Player completely. Check Task Manager — make sure
wmplayer.exeisn't hiding in the background. - Stop the WMP Network Sharing Service if it's running:
net stop "WMPNetworkSvc"
- Delete the library database files. They live in two places depending on your Windows version:
- Windows 10 / 11:
%LOCALAPPDATA%\Microsoft\Media Player\ - Windows 7 / 8.1:
%USERPROFILE%\AppData\Local\Microsoft\Media Player\
Inside that folder, delete CurrentDatabase_*.wmdb and wmplibrary_*.wmdb. Don't panic — WMP recreates them on next launch.
- Reopen WMP. Let it scan. Then try the JPEG again.
If the file plays now, you're done. If it still throws 0xC00D103D, the problem is the file itself — go to Step 3.
Step 3 — The 15-minute fix: repair or rescue the truncated JPEG
You can't play a JPEG that doesn't exist, but you can often recover most of the image. Here's the honest hierarchy — cheapest first.
Option A: Re-copy the file from the source
If the original is on an SD card, phone, or camera, copy it again over a proper connection. Don't use the camera's USB cable if you can avoid it — those mini-USB ports drop the connection constantly. Pop the SD card into a reader. This fixes the problem 80% of the time.
Option B: Repair with a JPEG repair tool
JPEGs are structured — even if the tail is missing, the header and most scan data are usually intact. Tools can rebuild the missing bits:
- JPEG Repair Toolkit or Stellar Repair for Photo — commercial, ~$30, decent success rate on truncated files.
- Photoshop — File → Open As → Camera Raw sometimes forces Photoshop to recover partial scan data. Free if you already have PS.
- jpegtran (from the libjpeg-turbo package) — command-line, free, and can sometimes copy the intact portion out:
jpegtran -copy all -outfile fixed.jpg broken.jpg
Won't always work, but it's free and takes ten seconds.
Option C: Recover from a backup or recycle bin
If the file came from email, re-download it. If it came from a backup — File History, OneDrive version history, Macrium — grab the older copy. OneDrive keeps 30 days of version history even on free accounts; right-click the file in Explorer and pick Version history.
Option D: Accept the loss
Sometimes a JPEG is just gone. If the header is damaged (not just the tail), no tool will save it. Delete it and move on — a broken file in your WMP library will keep triggering the error every time WMP scans.
Why this keeps happening
Windows Media Player hasn't been meaningfully updated since WMP 12 shipped with Windows 7. Microsoft's own docs still treat it as a legacy component. It uses an ancient JPEG decoder that bails the moment it hits an unexpected EOF — the modern Photos app is far more forgiving of partially-corrupt images.
My honest take: if you're doing slideshows at all, don't use WMP. Use the Photos app, or VLC if you want something that'll shrug off a mildly corrupt file. WMP is fine for a single video every six months. For photo viewing, it's the wrong tool.
Stopping it from coming back
- Eject USB drives properly. Every yanked drive is a chance for a truncated write.
- Don't copy thousands of photos in one drag. Explorer's copy queue is fragile. Break it into batches, or use Robocopy with retry flags:
robocopy "D:\DCIM" "C:\Photos" /E /R:3 /W:2 /Z
- Check SD cards with h2testw if you've had multiple corrupt images from the same card. Fake capacity cards are everywhere on Amazon and eBay — they report 64 GB but only hold 8 GB before silently corrupting everything past that point.
- Set WMP to skip missing files. Tools → Options → Library → uncheck Add items to the library automatically. Reduces the chance of WMP re-indexing the broken file on every launch.
When the error isn't the file
Rare case: the error fires on every JPEG, even ones you just saved from Photoshop. That points to a broken JPEG decoder registration — usually after a botched codec pack install (looking at you, K-Lite and Shark007). Uninstall every codec pack, reboot, then run:
regsvr32 /u "C:\Windows\System32\wmp.dll"
regsvr32 "C:\Windows\System32\wmp.dll"
Then reboot again. That re-registers WMP's native decoders and typically clears it up. If you've got a codec pack installed, get rid of it — WMP works fine without them and they cause more 0xC00D-prefix errors than they solve.
If Windows Media Player still won't cooperate, the pragmatic answer is: don't fight it. Switch to Photos or VLC, keep your JPEGs off truncated transfers, and this error disappears from your life.