[Interest] Crash in QMediaPlayer due to missing codec

maitai maitai at virtual-winds.org
Tue Jun 24 18:33:48 CEST 2025


Hello,

I have a Windows user that crashes consistently when the application is 
trying to play a sound.

Application is built against qt5.15.19 (widget based), and we are using 
QMediaPlayer to play sounds (.wav files). The user is running Windows 
10.

The message just before the crash is
DirectShowPlayerService::doRender: Unknown error 0x80040266.

After some googling, I asked the user to install the codecs that can be 
found here: https://codecguide.com/download_k-lite_codec_pack_basic.htm
and the issue was fixed.

Besides an obvious bug in QMediaPlayer, my question is: is there a way 
to detect that a codec is missing and avoid the crash by for instance 
not playing the sound, or to include the codecs in the distribution 
(which I am sure will cause some licensing issues) ?

Thanks
Philippe Lelong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20250624/78c68919/attachment.htm>


More information about the Interest mailing list