aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2012-09-09 13:47:40 -0400
committerMatthew Hoops2012-09-09 13:47:40 -0400
commit4a458236f625d28706cfe4560690770a395ee6e3 (patch)
tree556e0ba7d6fbd3b6cc35138f6bf2b873e464d604
parent72a1140d572ce46a820cddb6ac85b748cb7a066d (diff)
downloadscummvm-rg350-4a458236f625d28706cfe4560690770a395ee6e3.tar.gz
scummvm-rg350-4a458236f625d28706cfe4560690770a395ee6e3.tar.bz2
scummvm-rg350-4a458236f625d28706cfe4560690770a395ee6e3.zip
COMMON: Make QuickTimeParser::readSampleDesc take the desc size
-rw-r--r--audio/decoders/quicktime.cpp2
-rw-r--r--audio/decoders/quicktime_intern.h2
-rw-r--r--audio/midiparser_qt.cpp2
-rw-r--r--audio/midiparser_qt.h2
-rw-r--r--common/quicktime.cpp2
-rw-r--r--common/quicktime.h2
-rw-r--r--video/qt_decoder.cpp4
-rw-r--r--video/qt_decoder.h2
8 files changed, 9 insertions, 9 deletions
diff --git a/audio/decoders/quicktime.cpp b/audio/decoders/quicktime.cpp
index 5276cfc530..3ec90078db 100644
--- a/audio/decoders/quicktime.cpp
+++ b/audio/decoders/quicktime.cpp
@@ -134,7 +134,7 @@ void QuickTimeAudioDecoder::init() {
_audioTracks.push_back(new QuickTimeAudioTrack(this, _tracks[i]));
}
-Common::QuickTimeParser::SampleDesc *QuickTimeAudioDecoder::readSampleDesc(Track *track, uint32 format) {
+Common::QuickTimeParser::SampleDesc *QuickTimeAudioDecoder::readSampleDesc(Track *track, uint32 format, uint32 descSize) {
if (track->codecType == CODEC_TYPE_AUDIO) {
debug(0, "Audio Codec FourCC: \'%s\'", tag2str(format));
diff --git a/audio/decoders/quicktime_intern.h b/audio/decoders/quicktime_intern.h
index efc97cbd13..7e2b0d18d1 100644
--- a/audio/decoders/quicktime_intern.h
+++ b/audio/decoders/quicktime_intern.h
@@ -131,7 +131,7 @@ protected:
};
// Common::QuickTimeParser API
- virtual Common::QuickTimeParser::SampleDesc *readSampleDesc(Track *track, uint32 format);
+ virtual Common::QuickTimeParser::SampleDesc *readSampleDesc(Track *track, uint32 format, uint32 descSize);
void init();
diff --git a/audio/midiparser_qt.cpp b/audio/midiparser_qt.cpp
index e16c73bfec..65ca64a7f4 100644
--- a/audio/midiparser_qt.cpp
+++ b/audio/midiparser_qt.cpp
@@ -217,7 +217,7 @@ uint32 MidiParser_QT::readNextEvent(EventInfo &info) {
return 0;
}
-Common::QuickTimeParser::SampleDesc *MidiParser_QT::readSampleDesc(Track *track, uint32 format) {
+Common::QuickTimeParser::SampleDesc *MidiParser_QT::readSampleDesc(Track *track, uint32 format, uint32 descSize) {
if (track->codecType == CODEC_TYPE_MIDI) {
debug(0, "MIDI Codec FourCC '%s'", tag2str(format));
diff --git a/audio/midiparser_qt.h b/audio/midiparser_qt.h
index ac5f45ae34..f9378f9c3d 100644
--- a/audio/midiparser_qt.h
+++ b/audio/midiparser_qt.h
@@ -60,7 +60,7 @@ protected:
void parseNextEvent(EventInfo &info);
// QuickTimeParser
- SampleDesc *readSampleDesc(Track *track, uint32 format);
+ SampleDesc *readSampleDesc(Track *track, uint32 format, uint32 descSize);
private:
struct NoteRequestInfo {
diff --git a/common/quicktime.cpp b/common/quicktime.cpp
index 5ac9bee40f..5b3659b0d5 100644
--- a/common/quicktime.cpp
+++ b/common/quicktime.cpp
@@ -544,7 +544,7 @@ int QuickTimeParser::readSTSD(Atom atom) {
_fd->readUint16BE(); // reserved
_fd->readUint16BE(); // index
- track->sampleDescs[i] = readSampleDesc(track, format);
+ track->sampleDescs[i] = readSampleDesc(track, format, size - 16);
debug(0, "size=%d 4CC= %s codec_type=%d", size, tag2str(format), track->codecType);
diff --git a/common/quicktime.h b/common/quicktime.h
index 5a02fc8afb..0948a5010f 100644
--- a/common/quicktime.h
+++ b/common/quicktime.h
@@ -162,7 +162,7 @@ protected:
byte objectTypeMP4;
};
- virtual SampleDesc *readSampleDesc(Track *track, uint32 format) = 0;
+ virtual SampleDesc *readSampleDesc(Track *track, uint32 format, uint32 descSize) = 0;
uint32 _timeScale;
uint32 _duration;
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp
index b4dab9ddfb..a105a96853 100644
--- a/video/qt_decoder.cpp
+++ b/video/qt_decoder.cpp
@@ -110,7 +110,7 @@ const Graphics::Surface *QuickTimeDecoder::decodeNextFrame() {
return frame;
}
-Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format) {
+Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format, uint32 descSize) {
if (track->codecType == CODEC_TYPE_VIDEO) {
debug(0, "Video Codec FourCC: \'%s\'", tag2str(format));
@@ -205,7 +205,7 @@ Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::Qu
}
// Pass it on up
- return Audio::QuickTimeAudioDecoder::readSampleDesc(track, format);
+ return Audio::QuickTimeAudioDecoder::readSampleDesc(track, format, descSize);
}
void QuickTimeDecoder::init() {
diff --git a/video/qt_decoder.h b/video/qt_decoder.h
index 71d33711a6..b973a367d3 100644
--- a/video/qt_decoder.h
+++ b/video/qt_decoder.h
@@ -69,7 +69,7 @@ public:
Audio::Timestamp getDuration() const { return Audio::Timestamp(0, _duration, _timeScale); }
protected:
- Common::QuickTimeParser::SampleDesc *readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format);
+ Common::QuickTimeParser::SampleDesc *readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format, uint32 descSize);
private:
void init();