use shared ptrs instead of qobject for decoder memory handling

This commit is contained in:
itsmattkc
2019-05-29 03:06:58 +10:00
parent aa0832c482
commit c8fe9c9fc7
4 changed files with 5 additions and 8 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
#include "decoder.h"
Decoder::Decoder(QObject *parent) :
QObject(parent),
Decoder::Decoder() :
open_(false)
{
}
+2 -2
View File
@@ -20,9 +20,9 @@ class Decoder : public QObject
{
Q_OBJECT
public:
Decoder(QObject* parent = nullptr);
Decoder();
Decoder(FootageStream* fs, QObject *parent = nullptr);
Decoder(FootageStream* fs);
virtual ~Decoder();
+1 -2
View File
@@ -12,8 +12,7 @@ extern "C" {
#include "ui/mainwindow.h"
FFmpegDecoder::FFmpegDecoder(QObject *parent) :
Decoder(parent),
FFmpegDecoder::FFmpegDecoder() :
fmt_ctx_(nullptr),
codec_ctx_(nullptr),
opts_(nullptr)
+1 -2
View File
@@ -2,8 +2,7 @@
#include <QDebug>
FFmpegVideoDecoder::FFmpegVideoDecoder(QObject *parent) :
FFmpegDecoder(parent)
FFmpegVideoDecoder::FFmpegVideoDecoder()
{
}