mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
ExUtilReadFromStdin: (windows) open stdin in bin mode
fixes input/decode from stdin in the examples Change-Id: Ie8052da758a9ef64477501b709408236d258da82
This commit is contained in:
parent
e80eab1fbc
commit
a6140194ff
@ -46,6 +46,8 @@ int ExUtilReadFromStdin(const uint8_t** data, size_t* data_size) {
|
||||
*data = NULL;
|
||||
*data_size = 0;
|
||||
|
||||
if (!ExUtilSetBinaryMode(stdin)) return 0;
|
||||
|
||||
while (!feof(stdin)) {
|
||||
// We double the buffer size each time and read as much as possible.
|
||||
const size_t extra_size = (max_size == 0) ? kBlockSize : max_size;
|
||||
|
Loading…
Reference in New Issue
Block a user