]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Only disply the fps stuff if we have a stats function in the backend
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Mon, 23 May 2022 12:31:22 +0000 (13:31 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Mon, 23 May 2022 12:31:22 +0000 (13:31 +0100)
player.c

index fc9639766831dca764722b9866cfc5367ac561a3..c76039460ecae64f1bea0e139eb086b2b5dffcdf 100644 (file)
--- a/player.c
+++ b/player.c
@@ -2451,12 +2451,17 @@ void *player_thread_func(void *arg) {
 #endif
                   statistics_item("Nominal FPS", "%*.2f", 11, conn->remote_frame_rate);
                   statistics_item("Received FPS", "%*.2f", 12, conn->input_frame_rate);
-                  if (conn->frame_rate_valid) {
-                    statistics_item("Output FPS (r)", "%*.2f", 14, conn->raw_frame_rate);
-                    statistics_item("Output FPS (c)", "%*.2f", 14, conn->corrected_frame_rate);
+                  // only make the next two columns appear if we are getting stats information from the back end
+                  if (config.output->stats) {
+                    if (conn->frame_rate_valid) {
+                      statistics_item("Output FPS (r)", "%*.2f", 14, conn->raw_frame_rate);
+                      statistics_item("Output FPS (c)", "%*.2f", 14, conn->corrected_frame_rate);
+                    } else {
+                      statistics_item("Output FPS (r)", "           N/A");
+                      statistics_item("Output FPS (c)", "           N/A");
+                    }
                   } else {
-                    statistics_item("Output FPS (r)", "           N/A");
-                    statistics_item("Output FPS (c)", "           N/A");
+                    statistics_column = statistics_column + 2;
                   }
                   statistics_item("Source Drift PPM", "%*.2f", 16,
                                   (conn->local_to_remote_time_gradient - 1.0) * 1000000);