提交 9941ddb5 编写于 作者: Z Zachary Lund 提交者: Michael Fabian Dirks

libobs: Fix a potential divide by zero crash

上级 13542166
......@@ -1044,6 +1044,9 @@ void obs_source_video_tick(obs_source_t *source, float seconds)
static inline uint64_t conv_frames_to_time(const size_t sample_rate,
const size_t frames)
{
if (!sample_rate)
return 0;
return (uint64_t)frames * 1000000000ULL / (uint64_t)sample_rate;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册