Commit af05c336 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

libndi: Iterate over pending requests

Do not hardcode a specific number.
parent f4bf28d9
...@@ -424,7 +424,8 @@ static int receive_ndi_packet(ndi_ctx *ndi_ctx) ...@@ -424,7 +424,8 @@ static int receive_ndi_packet(ndi_ctx *ndi_ctx)
static int request_ndi_data(ndi_ctx *ndi_ctx) static int request_ndi_data(ndi_ctx *ndi_ctx)
{ {
for(int i = 0; i < 4; i++) { int pending = ndi_ctx->pending_requests;
for(int i = 0; i < pending; i++) {
ndi_message *ndi_request = &ndi_ctx->ndi_request[i]; ndi_message *ndi_request = &ndi_ctx->ndi_request[i];
// XXX: Check failure // XXX: Check failure
send(ndi_ctx->socket_fd, (void *)ndi_request->buf, ndi_request->len, 0); send(ndi_ctx->socket_fd, (void *)ndi_request->buf, ndi_request->len, 0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment