diff options
author | Matthew Hoops | 2011-04-12 14:01:42 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-04-12 14:01:42 -0400 |
commit | 4366f3632c1e89c026d8b28732e561062d168f82 (patch) | |
tree | 7da1c862a37fafc8f35d1a2f9cba20fcbe8a71c5 | |
parent | 78f17f290a01ffb96693e5892bfcb6d4a1319b67 (diff) | |
download | scummvm-rg350-4366f3632c1e89c026d8b28732e561062d168f82.tar.gz scummvm-rg350-4366f3632c1e89c026d8b28732e561062d168f82.tar.bz2 scummvm-rg350-4366f3632c1e89c026d8b28732e561062d168f82.zip |
COMMON: Cleanup QuickTime's readSTTS()
-rw-r--r-- | common/quicktime.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/common/quicktime.cpp b/common/quicktime.cpp index 176fdef8e7..32662d77f2 100644 --- a/common/quicktime.cpp +++ b/common/quicktime.cpp @@ -631,7 +631,7 @@ int QuickTimeParser::readSTSZ(MOVatom atom) { int QuickTimeParser::readSTTS(MOVatom atom) { MOVStreamContext *st = _streams[_numStreams - 1]; - uint32 total_sample_count = 0; + uint32 totalSampleCount = 0; _fd->readByte(); // version _fd->readByte(); _fd->readByte(); _fd->readByte(); // flags @@ -639,24 +639,18 @@ int QuickTimeParser::readSTTS(MOVatom atom) { st->stts_count = _fd->readUint32BE(); st->stts_data = new MOVstts[st->stts_count]; - debug(0, "track[%i].stts.entries = %i", _numStreams - 1, st->stts_count); + debug(0, "track[%d].stts.entries = %d", _numStreams - 1, st->stts_count); for (int32 i = 0; i < st->stts_count; i++) { - int sample_duration; - int sample_count; + st->stts_data[i].count = _fd->readUint32BE(); + st->stts_data[i].duration = _fd->readUint32BE(); - sample_count = _fd->readUint32BE(); - sample_duration = _fd->readUint32BE(); - st->stts_data[i].count = sample_count; - st->stts_data[i].duration = sample_duration; + debug(1, "\tCount = %d, Duration = %d", st->stts_data[i].count, st->stts_data[i].duration); - debug(0, "sample_count=%d, sample_duration=%d", sample_count, sample_duration); - - total_sample_count += sample_count; + totalSampleCount += st->stts_data[i].count; } - st->nb_frames = total_sample_count; - + st->nb_frames = totalSampleCount; return 0; } |