[Spice-commits] 2 commits - src/channel-display-gst.c src/spice-channel.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Mon Apr 16 12:03:40 UTC 2018
src/channel-display-gst.c | 3 ++-
src/spice-channel.c | 9 ++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 04db3a9b79e243e5bd9e193007c046b9e4c88e52
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Sat Apr 14 09:16:52 2018 +0100
spice-channel: Make some conditional code more readable
Avoid confusing indentation.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Snir Sheriber <ssheribe at redhat.com>
diff --git a/src/spice-channel.c b/src/spice-channel.c
index 55bdef9..7e3e3b7 100644
--- a/src/spice-channel.c
+++ b/src/spice-channel.c
@@ -884,13 +884,12 @@ static void spice_channel_flush_sasl(SpiceChannel *channel, const void *data, si
static void spice_channel_write(SpiceChannel *channel, const void *data, size_t len)
{
#ifdef HAVE_SASL
- SpiceChannelPrivate *c = channel->priv;
-
- if (c->sasl_conn)
+ if (channel->priv->sasl_conn) {
spice_channel_flush_sasl(channel, data, len);
- else
+ return;
+ }
#endif
- spice_channel_flush_wire(channel, data, len);
+ spice_channel_flush_wire(channel, data, len);
}
/* coroutine context */
commit 39c61d4a998f17e36240a321a3f92ecb1d5ef0c1
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Sat Apr 14 09:15:02 2018 +0100
channel-display-gst: Reduce contention on queues_mutex
We don't need to lock the entire queues to create a frame.
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 8b23036..6fb0450 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -559,8 +559,9 @@ static gboolean spice_gst_decoder_queue_frame(VideoDecoder *video_decoder,
GST_BUFFER_DTS(buffer) = GST_CLOCK_TIME_NONE;
GST_BUFFER_PTS(buffer) = gst_clock_get_time(decoder->clock) - gst_element_get_base_time(decoder->pipeline) + ((uint64_t)MAX(0, latency)) * 1000 * 1000;
+ SpiceGstFrame *gst_frame = create_gst_frame(buffer, frame);
g_mutex_lock(&decoder->queues_mutex);
- g_queue_push_tail(decoder->decoding_queue, create_gst_frame(buffer, frame));
+ g_queue_push_tail(decoder->decoding_queue, gst_frame);
g_mutex_unlock(&decoder->queues_mutex);
if (gst_app_src_push_buffer(decoder->appsrc, buffer) != GST_FLOW_OK) {
More information about the Spice-commits
mailing list