[Spice-commits] src/channel-display-gst.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Mon Apr 16 12:48:19 UTC 2018
src/channel-display-gst.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
New commits:
commit 463f62ff8c61337d12512032667ac37104d0e2bd
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Fri Apr 13 21:10:05 2018 +0100
channel-display-gst: Protect timer_id with queue_mutex
timer_id is supposed to be protected by this mutex, make sure this
is true in spice_gst_decoder_reschedule.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Snir Sheriber <ssheribe at redhat.com>
diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 6fb0450..0d7aabb 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -438,9 +438,15 @@ static gboolean create_pipeline(SpiceGstDecoder *decoder)
static void spice_gst_decoder_reschedule(VideoDecoder *video_decoder)
{
SpiceGstDecoder *decoder = (SpiceGstDecoder*)video_decoder;
- if (decoder->timer_id != 0) {
- g_source_remove(decoder->timer_id);
- decoder->timer_id = 0;
+ guint timer_id;
+
+ g_mutex_lock(&decoder->queues_mutex);
+ timer_id = decoder->timer_id;
+ decoder->timer_id = 0;
+ g_mutex_unlock(&decoder->queues_mutex);
+
+ if (timer_id != 0) {
+ g_source_remove(timer_id);
}
schedule_frame(decoder);
}
More information about the Spice-commits
mailing list