projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
826e8d5
)
Fix hang when examining content containing subtitles.
author
Carl Hetherington
<cth@carlh.net>
Fri, 13 May 2016 23:27:53 +0000
(
00:27
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Fri, 13 May 2016 23:27:53 +0000
(
00:27
+0100)
src/lib/signaller.h
patch
|
blob
|
history
diff --git
a/src/lib/signaller.h
b/src/lib/signaller.h
index 13474ee91baa3eac4e9c7d98042e29f17f68f0aa..c6037deaa085c737bce9e750b2171fba67aecd53 100644
(file)
--- a/
src/lib/signaller.h
+++ b/
src/lib/signaller.h
@@
-41,7
+41,17
@@
public:
}
bool finished () const {
- boost::mutex::scoped_lock lm (_mutex);
+ boost::mutex::scoped_lock lm (_mutex, boost::try_to_lock);
+ if (!lm) {
+ /* It's possible that emission of this
+ wrapper's signal causes another signal to
+ be emitted, which causes finished() on this
+ wrapper to be called (by Signaller::emit).
+ In this case, just say that the wrapper is
+ not yet finished.
+ */
+ return false;
+ }
return _finished;
}