aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/quicktime.cpp8
-rw-r--r--common/quicktime.h14
2 files changed, 14 insertions, 8 deletions
diff --git a/common/quicktime.cpp b/common/quicktime.cpp
index cf50584cc6..606e1bb9e6 100644
--- a/common/quicktime.cpp
+++ b/common/quicktime.cpp
@@ -686,7 +686,7 @@ int QuickTimeParser::readWAVE(MOVatom atom) {
if (atom.size > (1 << 30))
return -1;
- if (st->sampleDescs[0]->codecTag == MKTAG('Q', 'D', 'M', '2')) // Read extradata for QDM2
+ if (st->sampleDescs[0]->getCodecTag() == MKTAG('Q', 'D', 'M', '2')) // Read extradata for QDM2
st->extradata = _fd->readStream(atom.size - 8);
else if (atom.size > 8)
return readDefault(atom);
@@ -773,9 +773,9 @@ void QuickTimeParser::close() {
_fd = 0;
}
-QuickTimeParser::SampleDesc::SampleDesc() {
- codecTag = 0;
- bitsPerSample = 0;
+QuickTimeParser::SampleDesc::SampleDesc(MOVStreamContext *parentStream, uint32 codecTag) {
+ _parentStream = parentStream;
+ _codecTag = codecTag;
}
QuickTimeParser::MOVStreamContext::MOVStreamContext() {
diff --git a/common/quicktime.h b/common/quicktime.h
index a5903bc0f6..2bd461e389 100644
--- a/common/quicktime.h
+++ b/common/quicktime.h
@@ -116,12 +116,18 @@ protected:
Common::Rational mediaRate;
};
- struct SampleDesc {
- SampleDesc();
+ struct MOVStreamContext;
+
+ class SampleDesc {
+ public:
+ SampleDesc(MOVStreamContext *parentStream, uint32 codecTag);
virtual ~SampleDesc() {}
- uint32 codecTag;
- uint16 bitsPerSample;
+ uint32 getCodecTag() const { return _codecTag; }
+
+ protected:
+ MOVStreamContext *_parentStream;
+ uint32 _codecTag;
};
enum CodecType {