oiiodecoder: set correct stream count

Fixes #1985
This commit is contained in:
itsmattkc
2022-07-25 13:08:28 -07:00
parent 3fb786a868
commit 33742a62cf
3 changed files with 5 additions and 12 deletions
-10
View File
@@ -1,10 +0,0 @@
#ifndef FOOTAGEMETA_H
#define FOOTAGEMETA_H
struct FootageData {
struct StreamData {
};
};
#endif // FOOTAGEMETA_H
+4 -1
View File
@@ -73,7 +73,8 @@ FootageDescription OIIODecoder::Probe(const QString &filename, CancelAtom *cance
bool stream_enabled = true;
for (int i=0; in->seek_subimage(i, 0); i++) {
int i;
for (i=0; in->seek_subimage(i, 0); i++) {
OIIO::ImageSpec spec = in->spec();
VideoParams video_params = GetVideoParamsFromImageSpec(spec);
@@ -104,6 +105,8 @@ FootageDescription OIIODecoder::Probe(const QString &filename, CancelAtom *cance
desc.AddVideoStream(video_params);
}
desc.SetStreamCount(i);
// If we're here, we have a successful image open
in->close();
@@ -142,7 +142,7 @@ public:
}
private:
static constexpr unsigned kFootageMetaVersion = 3;
static constexpr unsigned kFootageMetaVersion = 4;
QString decoder_;