projects
/
libdcp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1913306
)
Note first difference on an audio equals() discrepancy.
author
Carl Hetherington
<cth@carlh.net>
Tue, 2 Oct 2012 23:16:29 +0000
(
00:16
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 2 Oct 2012 23:16:29 +0000
(
00:16
+0100)
src/sound_asset.cc
patch
|
blob
|
history
diff --git
a/src/sound_asset.cc
b/src/sound_asset.cc
index 7a3d44152b4b27ff15844ae19c97866ef41dc1b5..9f27a894dcdc71b489a461c301609699643fc984 100644
(file)
--- a/
src/sound_asset.cc
+++ b/
src/sound_asset.cc
@@
-255,6
+255,14
@@
SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, list<str
if (memcmp (buffer_A.RoData(), buffer_B.RoData(), buffer_A.Size()) != 0) {
notes.push_back ("PCM data for MXF frame " + lexical_cast<string>(i) + " differ");
+
+ for (uint32_t i = 0; i < buffer_A.Size(); ++i) {
+ int const d = abs (buffer_A.RoData()[i] - buffer_B.RoData()[i]);
+ if (d) {
+ notes.push_back ("First difference is " + lexical_cast<string> (d));
+ return false;
+ }
+ }
return false;
}
}