/pidgin/main: fc04ac95763d: Merge with release-2.x.y
Jakub Adam
jakub.adam at ktknet.cz
Thu Oct 8 11:39:11 EDT 2015
Changeset: fc04ac95763de689f56cc5d7fd21535ea600730a
Author: Jakub Adam <jakub.adam at ktknet.cz>
Date: 2015-10-08 13:21 +0200
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/fc04ac95763d
Description:
Merge with release-2.x.y
diffstat:
libpurple/mediamanager.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diffs (42 lines):
diff --git a/libpurple/mediamanager.c b/libpurple/mediamanager.c
--- a/libpurple/mediamanager.c
+++ b/libpurple/mediamanager.c
@@ -923,6 +923,7 @@ appsink_readable (gpointer user_data)
gpointer cb_data;
guint *cb_token_ptr = &info->readable_cb_token;
guint cb_token = *cb_token_ptr;
+ gboolean run_again = FALSE;
g_mutex_lock (&manager->priv->appdata_mutex);
if (cb_token == 0 || cb_token != *cb_token_ptr) {
@@ -930,8 +931,8 @@ appsink_readable (gpointer user_data)
g_mutex_unlock (&manager->priv->appdata_mutex);
return FALSE;
}
- /* We need to signal readable until there are no more samples */
- while (info->callbacks.readable &&
+
+ if (info->callbacks.readable &&
(info->num_samples > 0 || info->current_sample != NULL)) {
readable_cb = info->callbacks.readable;
media = g_weak_ref_get (&info->media_ref);
@@ -953,9 +954,17 @@ appsink_readable (gpointer user_data)
return FALSE;
}
}
- info->readable_cb_token = 0;
+
+ /* Do we still have samples? Schedule appsink_readable again. We break here
+ * so that other events get a chance to be processed too. */
+ if (info->num_samples > 0 || info->current_sample != NULL) {
+ run_again = TRUE;
+ } else {
+ info->readable_cb_token = 0;
+ }
+
g_mutex_unlock (&manager->priv->appdata_mutex);
- return FALSE;
+ return run_again;
}
static void
More information about the Commits
mailing list