Changeset View
Changeset View
Standalone View
Standalone View
multimedia/obs-studio/files/patch-plugins_linux-alsa_alsa-input.c
- This file was added.
--- plugins/linux-alsa/alsa-input.c.orig 2020-04-26 23:47:36 UTC | |||||
+++ plugins/linux-alsa/alsa-input.c | |||||
@@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu. | |||||
#include <util/bmem.h> | |||||
#include <util/platform.h> | |||||
#include <util/threading.h> | |||||
+#include <util/util_uint64.h> | |||||
#include <obs-module.h> | |||||
#include <alsa/asoundlib.h> | |||||
@@ -562,8 +563,9 @@ void *_alsa_listen(void *attr) | |||||
} | |||||
out.frames = frames; | |||||
- out.timestamp = os_gettime_ns() - | |||||
- ((frames * NSEC_PER_SEC) / data->rate); | |||||
+ out.timestamp = | |||||
+ os_gettime_ns() - | |||||
+ util_mul_div64(frames, NSEC_PER_SEC, data->rate); | |||||
if (!data->first_ts) | |||||
data->first_ts = out.timestamp + STARTUP_TIMEOUT_NS; |