Skip to content

Commit

Permalink
Fix saving and loading audio indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoyne committed Mar 27, 2014
1 parent 4c99f29 commit 27c1efd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/ffms.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#define FFMS_H

// Version format: major - minor - micro - bump
#define FFMS_VERSION ((2 << 24) | (19 << 16) | (0 << 8) | 2)
#define FFMS_VERSION ((2 << 24) | (19 << 16) | (0 << 8) | 3)

#include <stdint.h>

Expand Down
4 changes: 2 additions & 2 deletions src/core/indexing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void TFrameInfo::Read(zipped_file &stream, TFrameInfo const& prev, const FFMS_Tr

if (TT == FFMS_TYPE_AUDIO) {
SampleStart = stream.read<int64_t>() + prev.SampleStart;
SampleCount = stream.read<uint32_t>();
SampleCount = stream.read<uint32_t>() + prev.SampleCount;
}
else if (TT == FFMS_TYPE_VIDEO) {
FrameType = stream.read<uint8_t>();
Expand All @@ -197,7 +197,7 @@ void TFrameInfo::Write(zipped_file &stream, TFrameInfo const& prev, const FFMS_T
stream.write(static_cast<uint64_t>(OriginalPos) - prev.OriginalPos);

if (TT == FFMS_TYPE_AUDIO) {
stream.write(SampleStart);
stream.write(SampleStart - prev.SampleStart);
stream.write(SampleCount - prev.SampleCount);
}
else if (TT == FFMS_TYPE_VIDEO) {
Expand Down

0 comments on commit 27c1efd

Please sign in to comment.