mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix crash on startup due to sound initialization
Of course `WavpackOpenFileInputEx` is subtly incompatible to `WavpackOpenFileInputEx64` in that it requires the userdata for the main steam to be nonnull. Fixes #1041.
This commit is contained in:
parent
ca22f08dc4
commit
f7b7054152
|
@ -521,7 +521,7 @@ int CSound::DecodeWV(int SampleID, const void *pData, unsigned DataSize)
|
||||||
Callback.get_pos = GetPos;
|
Callback.get_pos = GetPos;
|
||||||
Callback.push_back_byte = PushBackByte;
|
Callback.push_back_byte = PushBackByte;
|
||||||
Callback.read_bytes = ReadData;
|
Callback.read_bytes = ReadData;
|
||||||
pContext = WavpackOpenFileInputEx(&Callback,0, 0, aError, 0, 0);
|
pContext = WavpackOpenFileInputEx(&Callback, (void *)1, 0, aError, 0, 0);
|
||||||
#else
|
#else
|
||||||
pContext = WavpackOpenFileInput(ReadDataOld, aError);
|
pContext = WavpackOpenFileInput(ReadDataOld, aError);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue