Commit e8632477 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

stream_encoder.c : Only set 10MB output buffer on _WIN32.

Commig 6a6207b5 set the size of the encoder output buffer to 10MB
but this fix is really only needed on Windows, so wrap it in an #ifdef.
parent 25db9b2c
......@@ -1288,8 +1288,13 @@ static FLAC__StreamEncoderInitStatus init_FILE_internal_(
if(file == stdout)
file = get_binary_stdout_(); /* just to be safe */
setvbuf(file, NULL, _IOFBF, 10*1024*1024); /* 10MB output buffer to help reduce disk fragmentation */
#ifdef _WIN32
* Windows can suffer quite badly from disk fragmentation. This can be
* reduced significantly by setting the output buffer size to be 10MB.
setvbuf(file, NULL, _IOFBF, 10*1024*1024);
encoder->private_->file = file;
encoder->private_->progress_callback = progress_callback;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment