[vlc-commits] messages: disable cancellation
Rémi Denis-Courmont
git at videolan.org
Mon Apr 20 17:12:14 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 20 18:05:58 2015 +0300| [fba2ed8ac8fed3aec4c7604a30395793044b1d49] | committer: Rémi Denis-Courmont
messages: disable cancellation
vlc_rwlock_rdlock() may be a cancellation point.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fba2ed8ac8fed3aec4c7604a30395793044b1d49
---
src/misc/messages.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/misc/messages.c b/src/misc/messages.c
index e22e4fe7..651c295 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -57,11 +57,14 @@ static void vlc_vaLogCallback(libvlc_int_t *vlc, int type,
va_list ap)
{
vlc_logger_t *logger = libvlc_priv(vlc)->logger;
+ int canc;
assert(logger != NULL);
+ canc = vlc_savecancel();
vlc_rwlock_rdlock(&logger->lock);
logger->log(logger->sys, type, item, format, ap);
vlc_rwlock_unlock(&logger->lock);
+ vlc_restorecancel(canc);
}
static void vlc_LogCallback(libvlc_int_t *vlc, int type, const vlc_log_t *item,
More information about the vlc-commits
mailing list