Blame SOURCES/0019-sink_event_probe-do-not-keep-duration-in-a-variable.patch

5de2a4
From bb4999f6e450aa1b1270ade7113966869fc4ed27 Mon Sep 17 00:00:00 2001
5de2a4
From: Uri Lublin <uril@redhat.com>
5de2a4
Date: Wed, 11 Nov 2020 20:34:09 +0200
5de2a4
Subject: [PATCH 19/22] sink_event_probe: do not keep duration in a variable
5de2a4
5de2a4
If not ENABLE_RECORDER, then duration is assigned a value
5de2a4
but is never used - as the compiler optimizes it out.
5de2a4
5de2a4
Fixes the following clang warning:
5de2a4
  src/channel-display-gst.c:443:21: warning: Value stored to
5de2a4
  'duration' during its initialization is never read
5de2a4
5de2a4
Signed-off-by: Uri Lublin <uril@redhat.com>
5de2a4
---
5de2a4
 src/channel-display-gst.c | 4 ++--
5de2a4
 1 file changed, 2 insertions(+), 2 deletions(-)
5de2a4
5de2a4
diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
5de2a4
index c58a90f..36db3a3 100644
5de2a4
--- a/src/channel-display-gst.c
5de2a4
+++ b/src/channel-display-gst.c
5de2a4
@@ -439,7 +439,6 @@ sink_event_probe(GstPad *pad, GstPadProbeInfo *info, gpointer data)
5de2a4
         if (l) {
5de2a4
             SpiceGstFrame *gstframe = l->data;
5de2a4
             const SpiceFrame *frame = gstframe->encoded_frame;
5de2a4
-            int64_t duration = g_get_monotonic_time() - frame->creation_time;
5de2a4
             /* Note that queue_len (the length of the queue prior to adding
5de2a4
              * this frame) is crucial to correctly interpret the decoding time:
5de2a4
              * - Less than MAX_DECODED_FRAMES means nothing blocked the
5de2a4
@@ -450,7 +449,8 @@ sink_event_probe(GstPad *pad, GstPadProbeInfo *info, gpointer data)
5de2a4
             record(frames_stats,
5de2a4
                    "frame mm_time %u size %u creation time %" PRId64
5de2a4
                    " decoded time %" PRId64 " queue %u before %u",
5de2a4
-                   frame->mm_time, frame->size, frame->creation_time, duration,
5de2a4
+                   frame->mm_time, frame->size, frame->creation_time,
5de2a4
+                   g_get_monotonic_time() - frame->creation_time,
5de2a4
                    decoder->decoding_queue->length, gstframe->queue_len);
5de2a4
 
5de2a4
             if (!decoder->appsink) {
5de2a4
-- 
5de2a4
2.28.0
5de2a4