mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
ExUtilReadFromStdin: (windows) open stdin in bin mode
fixes input/decode from stdin in the examples
(cherry picked from commit a6140194ff
)
Change-Id: Ie8052da758a9ef64477501b709408236d258da82
This commit is contained in:
parent
4206ac6bbf
commit
6ecd5bf682
@ -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