Fix memory leak when opening and closing remux window without remuxing

The remuxer thread was only started if there was an actual remux job,
which resulted in the remuxer thread not being able to call the worker's
destructor (because it wasn't running)
This commit is contained in:
Palana 2014-10-13 20:09:44 +02:00
parent 0619977549
commit 3dc1b7f3d5

View File

@ -58,6 +58,7 @@ OBSRemux::OBSRemux(const char *path, QWidget *parent)
this, &OBSRemux::inputChanged);
worker->moveToThread(&remuxer);
remuxer.start();
//gcc-4.8 can't use QPointer<RemuxWorker> below
RemuxWorker *worker_ = worker;
@ -157,8 +158,6 @@ void OBSRemux::Remux()
ui->progressBar->setVisible(true);
ui->remux->setEnabled(false);
if (!remuxer.isRunning())
remuxer.start();
emit remux();
}