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

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