projects
/
asdcplib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
00da026
)
Fix HMAC sequence count on MXF read.
author
dbullock
<dbullock@cinecert.com>
Fri, 14 Jun 2019 22:30:13 +0000
(15:30 -0700)
committer
dbullock
<dbullock@cinecert.com>
Fri, 28 Jun 2019 16:35:51 +0000
(09:35 -0700)
This fixes #4.
src/AS_DCP_internal.h
patch
|
blob
|
history
diff --git
a/src/AS_DCP_internal.h
b/src/AS_DCP_internal.h
index 83272c09b431a8861ab0a0355abc0172d186d961..57ed006a04dffcee8351ae8362d489e2603a6ba3 100755
(executable)
--- a/
src/AS_DCP_internal.h
+++ b/
src/AS_DCP_internal.h
@@
-414,17
+414,23
@@
namespace ASDCP
// Count the sequence length in because this is the sequence
// value needed to complete the HMAC.
ASDCP::MXF::RIP::const_pair_iterator i;
// Count the sequence length in because this is the sequence
// value needed to complete the HMAC.
ASDCP::MXF::RIP::const_pair_iterator i;
- for ( i = m_RIP.PairArray.begin(); i != m_RIP.PairArray.end(); ++i
, ++sequence
)
+ for ( i = m_RIP.PairArray.begin(); i != m_RIP.PairArray.end(); ++i)
{
{
- if ( sid == i->BodySID )
- {
- start_offset = i->ByteOffset;
- }
- else if ( start_offset != 0 )
- {
- end_offset = i->ByteOffset;
- break;
- }
+ if ( sid == i->BodySID )
+ {
+ assert( start_offset == 0);
+ start_offset = i->ByteOffset;
+ }
+ else if ( start_offset != 0 )
+ {
+ end_offset = i->ByteOffset;
+ break;
+ }
+
+ if ( i->BodySID > 0 )
+ {
+ ++sequence;
+ }
}
if ( start_offset == 0 || end_offset == 0 )
}
if ( start_offset == 0 || end_offset == 0 )