mirror of
https://github.com/pikvm/ustreamer.git
synced 2025-12-23 18:50:00 +00:00
issue #253: m2m polling limit
This commit is contained in:
parent
2dddb879bc
commit
848f52c69e
@ -441,7 +441,14 @@ static int _m2m_encoder_compress_raw(us_m2m_encoder_s *enc, const us_frame_s *sr
|
|||||||
// Для не-DMA отправка буфера по факту являтся освобождением этого буфера
|
// Для не-DMA отправка буфера по факту являтся освобождением этого буфера
|
||||||
bool input_released = !_RUN(dma);
|
bool input_released = !_RUN(dma);
|
||||||
|
|
||||||
|
const long double deadline_ts = us_get_now_monotonic() + 1;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
if (us_get_now_monotonic() > deadline_ts) {
|
||||||
|
_E_LOG_ERROR("The encoder wait is too long");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
struct pollfd enc_poll = {_RUN(fd), POLLIN, 0};
|
struct pollfd enc_poll = {_RUN(fd), POLLIN, 0};
|
||||||
|
|
||||||
_E_LOG_DEBUG("Polling encoder ...");
|
_E_LOG_DEBUG("Polling encoder ...");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user