Fixed fopen() mode in LameEncoder to ensure the gapless header is properly written.

This commit is contained in:
casey langen 2017-11-28 22:05:46 -08:00
parent 2942b81a2c
commit c8c9d94f9a

View File

@ -155,7 +155,7 @@ void LameEncoder::Finalize(const char* uri) {
#ifdef WIN32
FILE* fp = _wfopen(utf8to16(uri).c_str(), L"r+b");
#else
FILE* fp = fopen(uri, "a+b");
FILE* fp = fopen(uri, "r+b");
#endif
if (fp) {
if (!fseek(fp, 0, SEEK_SET)) {