[Spice-commits] src/channel-display-gst.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Fri Jul 21 08:46:09 UTC 2017
src/channel-display-gst.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit b0e7619f52aaf9fb92d0088d404e2a735628b0eb
Author: Uri Lublin <uril at redhat.com>
Date: Thu Jul 20 19:41:13 2017 +0300
gst: new_sample: remove redundant sample? condition
Move the declaration and assignment of 'buffer' into
the if (sample) block, where sample is not NULL.
Signed-off-by: Uri Lublin <uril at redhat.com>
Acked-by: Pavel Grunt <pgrunt at redhat.com>
diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 3f51361..03c6044 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -200,8 +200,8 @@ static GstFlowReturn new_sample(GstAppSink *gstappsink, gpointer video_decoder)
SpiceGstDecoder *decoder = video_decoder;
GstSample *sample = gst_app_sink_pull_sample(decoder->appsink);
- GstBuffer *buffer = sample ? gst_sample_get_buffer(sample) : NULL;
if (sample) {
+ GstBuffer *buffer = gst_sample_get_buffer(sample);
g_mutex_lock(&decoder->queues_mutex);
/* gst_app_sink_pull_sample() sometimes returns the same buffer twice
More information about the Spice-commits
mailing list