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