diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-12-11 13:55:44 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-12-11 13:55:44 +0000 |
| commit | 26bae2c8893c7d3c17d8af4e12f6a7ba24eed393 (patch) | |
| tree | a3465b5a6d6b8f6b92da92db7c1b9bd7e183ca9d | |
| parent | db4171e4fa1edbba346f1e9148e12dfb729e6f1f (diff) | |
Fix logging when using OpenMP.
| -rw-r--r-- | src/mono_picture_asset.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mono_picture_asset.cc b/src/mono_picture_asset.cc index 27d87949..b367a19d 100644 --- a/src/mono_picture_asset.cc +++ b/src/mono_picture_asset.cc @@ -121,16 +121,13 @@ MonoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, No if (result || opt.keep_going) { -#pragma omp critical - note (DCP_PROGRESS, String::compose ("Comparing video frame %1 of %2", i, _intrinsic_duration)); - shared_ptr<const MonoPictureFrame> frame_A = get_frame (i); shared_ptr<const MonoPictureFrame> frame_B = other_picture->get_frame (i); list<pair<NoteType, string> > notes; if (!frame_buffer_equals ( - i, opt, bind (&storing_note_handler, notes, _1, _2), + i, opt, bind (&storing_note_handler, boost::ref(notes), _1, _2), frame_A->j2k_data(), frame_A->j2k_size(), frame_B->j2k_data(), frame_B->j2k_size() )) { @@ -138,8 +135,11 @@ MonoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, No } #pragma omp critical - for (list<pair<NoteType, string> >::const_iterator i = notes.begin(); i != notes.end(); ++i) { - note (i->first, i->second); + { + note (DCP_PROGRESS, String::compose ("Compared video frame %1 of %2", i, _intrinsic_duration)); + for (list<pair<NoteType, string> >::const_iterator i = notes.begin(); i != notes.end(); ++i) { + note (i->first, i->second); + } } } } |
