mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
webpmux: (windows) open stdout in binary mode
prevents corrupt output. related to issue #217 Change-Id: I6f0dac8131127717ba72b0709fb35d421ab41acb
This commit is contained in:
parent
e9bfb1166d
commit
e80eab1fbc
@ -402,8 +402,9 @@ static int CreateMux(const char* const filename, WebPMux** mux) {
|
|||||||
|
|
||||||
static int WriteData(const char* filename, const WebPData* const webpdata) {
|
static int WriteData(const char* filename, const WebPData* const webpdata) {
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
FILE* fout = strcmp(filename, "-") ? fopen(filename, "wb") : stdout;
|
FILE* fout = strcmp(filename, "-") ? fopen(filename, "wb")
|
||||||
if (!fout) {
|
: ExUtilSetBinaryMode(stdout);
|
||||||
|
if (fout == NULL) {
|
||||||
fprintf(stderr, "Error opening output WebP file %s!\n", filename);
|
fprintf(stderr, "Error opening output WebP file %s!\n", filename);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user