summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-03-13 12:41:34 -0800
committerVito Caputo <vcaputo@pengaru.com>2021-03-13 12:41:34 -0800
commitf3f4730c2236a3f27a921d818f14bc62b0e311d0 (patch)
tree4875c2330b6778acb1431247e86f8b6c889b21f8
parentf8b78e9271600f67f7eafb09b66e00640f2c002f (diff)
get_frames: remove superfluous avd assignment
Since avd is unconditionally copied just a few lines down, this copy is pointless and harms readability. I think when it was originally written there was going to be an else branch where the unconditional copy is currently, but never bothered. The avd shared variable should really get changed to an atomic, removing its lock. To anyone reading: PRs welcome.
-rw-r--r--src/rmd_get_frames.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/rmd_get_frames.c b/src/rmd_get_frames.c
index 931d8b2..bf7ff84 100644
--- a/src/rmd_get_frames.c
+++ b/src/rmd_get_frames.c
@@ -307,7 +307,6 @@ static boolean sync_next_frame(ProgData *pdata)
if (pdata->last_frame_ts.tv_sec) {
pthread_mutex_lock(&pdata->avd_mutex);
pdata->avd -= timespec_delta_in_us(&now, &pdata->last_frame_ts);
- avd = pdata->avd;
pthread_mutex_unlock(&pdata->avd_mutex);
}
© All Rights Reserved