mirror of
				https://github.com/webmproject/libwebp.git
				synced 2025-10-31 10:25:46 +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:
		| @@ -46,6 +46,8 @@ int ExUtilReadFromStdin(const uint8_t** data, size_t* data_size) { | |||||||
|   *data = NULL; |   *data = NULL; | ||||||
|   *data_size = 0; |   *data_size = 0; | ||||||
|  |  | ||||||
|  |   if (!ExUtilSetBinaryMode(stdin)) return 0; | ||||||
|  |  | ||||||
|   while (!feof(stdin)) { |   while (!feof(stdin)) { | ||||||
|     // We double the buffer size each time and read as much as possible. |     // We double the buffer size each time and read as much as possible. | ||||||
|     const size_t extra_size = (max_size == 0) ? kBlockSize : max_size; |     const size_t extra_size = (max_size == 0) ? kBlockSize : max_size; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user