0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

libobs: Fix bug with process piping

The size parameter is the size of the elements, not the size of the
data.  The size parameter should be 1, and the elements should be the
number of bytes.

The reason why I'm making this change is because the fread/fwrite would
fail when the parameters were swapped.
This commit is contained in:
jp9000 2015-05-29 02:50:05 -07:00
parent 336cd7ebe9
commit 43956388b2

View File

@ -63,7 +63,7 @@ size_t os_process_pipe_read(os_process_pipe_t *pp, uint8_t *data, size_t len)
return 0;
}
return fread(data, len, 1, pp->file);
return fread(data, 1, len, pp->file);
}
size_t os_process_pipe_write(os_process_pipe_t *pp, const uint8_t *data,
@ -76,5 +76,5 @@ size_t os_process_pipe_write(os_process_pipe_t *pp, const uint8_t *data,
return 0;
}
return fwrite(data, len, 1, pp->file);
return fwrite(data, 1, len, pp->file);
}