use shared ptrs instead of qobject for decoder memory handling
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#include "decoder.h"
|
||||
|
||||
Decoder::Decoder(QObject *parent) :
|
||||
QObject(parent),
|
||||
Decoder::Decoder() :
|
||||
open_(false)
|
||||
{
|
||||
}
|
||||
|
||||
+2
-2
@@ -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();
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
FFmpegVideoDecoder::FFmpegVideoDecoder(QObject *parent) :
|
||||
FFmpegDecoder(parent)
|
||||
FFmpegVideoDecoder::FFmpegVideoDecoder()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user