diff options
| author | Pierre-Anthony Lemieux <pal@palemieux.com> | 2019-12-20 22:05:59 -0800 |
|---|---|---|
| committer | Pierre-Anthony Lemieux <pal@palemieux.com> | 2019-12-20 22:05:59 -0800 |
| commit | 5dd260660cfa14ece62365139962dfb4cbbafb10 (patch) | |
| tree | a952fa280e944fd1394b3779fd50f1ead1c8b8f3 /src/JP2K_Sequence_Parser.cpp | |
| parent | 166e7b4b202bc8febb13b59710579fbbd724e2b6 (diff) | |
Fixed bug when comparing ExtendedCapabilities_t structures
Diffstat (limited to 'src/JP2K_Sequence_Parser.cpp')
| -rwxr-xr-x | src/JP2K_Sequence_Parser.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/JP2K_Sequence_Parser.cpp b/src/JP2K_Sequence_Parser.cpp index e8d779c..cb73edd 100755 --- a/src/JP2K_Sequence_Parser.cpp +++ b/src/JP2K_Sequence_Parser.cpp @@ -253,14 +253,18 @@ operator==(const ASDCP::JP2K::CodingStyleDefault_t& lhs, const ASDCP::JP2K::Codi bool operator==(const ASDCP::JP2K::ExtendedCapabilities_t& lhs, const ASDCP::JP2K::ExtendedCapabilities_t& rhs) { - if (lhs.Pcap != rhs.Pcap) return false; - if (lhs.N != rhs.N) return false; - for (ui32_t i = 0; i < lhs.N; i++) - { - if (lhs.Ccap[i] != rhs.Ccap[i]) - return false; + if (lhs.N != JP2K::NoExtendedCapabilitiesSignaled) { + + if (lhs.Pcap != rhs.Pcap) return false; + + for (ui32_t i = 0; i < lhs.N; i++) + { + if (lhs.Ccap[i] != rhs.Ccap[i]) + return false; + } + } return true; |
