oiiodecoder: fixed segfault caused by some OIIO decoders if they received

unexpected data

When "probing" footage, Olive runs it past all of its decoders until one
responds that it can decode this file. However this caused issues when some
OIIO decoders would erroneously pick up incompatible files, try to read them
and segfault the entire app (notable OpenJPEG with MPEG-4 and RLA with WAVE
audio). We now use the file extension to check with OIIO if it "should" be
compatible before actually testing if it is.

This is not a "perfect" solution (i.e. someone could recreate the segfault by
renaming an MPEG-4 file to an image extension like .JPG), but is probably as
much as can be done Olive-side and should filter out all segfaults under normal
circumstances.
This commit is contained in:
itsmattkc
2020-01-26 11:54:49 +11:00
parent 6bef94b3e2
commit 490a634473
2 changed files with 21 additions and 0 deletions
+2
View File
@@ -64,6 +64,8 @@ private:
FramePtr frame_;
static QStringList supported_formats_;
};
#endif // OIIODECODER_H