Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
6.2.0
-
None
Description
I am using Qt6.2.0 and when instantiating the QAudioOuput object my app crashes and doesn't even start, seems to be some code in the constructor that it is causing it.
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); videoWidget = new QVideoWidget(this); videoWidget->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); videoWidget->setMinimumHeight(0); // audioOutput = new QAudioOutput(this); mediaPlayer = new QMediaPlayer(this); mediaPlayer->setVideoOutput(videoWidget); mediaPlayer->setSource(QUrl::fromLocalFile("D:\\Videos\\Videos\\New\\Michael J - Bad.mp4")); // mediaPlayer->setAudioOutput(audioOutput); ui->stackedWidget->addWidget(videoWidget); ui->stackedWidget->setCurrentWidget(videoWidget); } MainWindow::~MainWindow() { delete ui; } void MainWindow::on_pushButton_clicked() { mediaPlayer->play(); }
If I uncomment
audioOutput = new QAudioOutput(this);
the app crashes before even starting.
QAudioOutput is only for the audio which means that without it the video will be muted but still play supposedly which doesn't happen still. If I click the button nothing happens while if I switch to Qt5 it works fine.
Attachments
Issue Links
- duplicates
-
QTBUG-95234 MingW build does not find WMF, and builds without a valid backend
- Closed