Qt播放音视频文件报错DirectShowPlayerService::doRender: Unresolved error code 0x80040266或DirectShowPlayerService::doSetUrlSource: Unresolved error code 0x80004005 ()
使用QMediaPlayer和QVideoWidget QHBoxLayout *m_layout= newQHBoxLayout(this); QMediaPlayer *m_player = new QMediaPlayer(this); m_player->setMedia(QUrl::fromLocalFile(QString::fromLocal8Bit("d:/QtTest/111.mp4"))); QVideoWidget *m_videoW = new QVideoWidget(this); m_layout->addWidget(m_videoW); this->setLayout(m_layout); m_player->setVideoOutput(m_videoW); m_videoW->show(); m_player->play(); 代码写起来很简单,编译也能通过,但是运行就会出错 DirectShowPlayerService::doRender: Unresolved error code 0x80040266 如果文件路径不对或者文件名是中文的,则会显示如下错误: DirectShowPlayerService::doSetUrlSource: Unresolved error code 0x80004005 () 网上查了下, Qt