diff --git a/src/Clip.cpp b/src/Clip.cpp index f80705c9..506d5081 100644 --- a/src/Clip.cpp +++ b/src/Clip.cpp @@ -93,9 +93,6 @@ void Clip::init_settings() has_video = Keyframe(-1.0); // Default pointers - reader = NULL; - resampler = NULL; - audio_cache = NULL; manage_reader = false; } @@ -124,18 +121,15 @@ void Clip::init_reader_rotation() { } // Default Constructor for a clip -Clip::Clip() : reader(NULL) +Clip::Clip() : reader(NULL), resampler(NULL), audio_cache(NULL) { // Init all default settings init_settings(); } // Constructor with reader -Clip::Clip(ReaderBase* new_reader) +Clip::Clip(ReaderBase* new_reader) : reader(new_reader), resampler(NULL), audio_cache(NULL) { - // Set the reader - reader = new_reader; - // Init all default settings init_settings(); @@ -148,7 +142,7 @@ Clip::Clip(ReaderBase* new_reader) } // Constructor with filepath -Clip::Clip(string path) : reader(NULL) +Clip::Clip(string path) : reader(NULL), resampler(NULL), audio_cache(NULL) { // Init all default settings init_settings(); diff --git a/src/QtImageReader.cpp b/src/QtImageReader.cpp index bbfae20b..764ef6ed 100644 --- a/src/QtImageReader.cpp +++ b/src/QtImageReader.cpp @@ -55,13 +55,13 @@ void QtImageReader::Open() image = std::shared_ptr(new QImage()); bool success = image->load(QString::fromStdString(path)); - // Set pixel format - image = std::shared_ptr(new QImage(image->convertToFormat(QImage::Format_RGBA8888))); - if (!success) // raise exception throw InvalidFile("File could not be opened.", path); + // Set pixel format + image = std::shared_ptr(new QImage(image->convertToFormat(QImage::Format_RGBA8888))); + // Update image properties info.has_audio = false; info.has_video = true;