Added a vorbis close_func callback to prevent crashing on iphone devices using the tremor vorbis library.
This commit is contained in:
parent
09a7d8d6e7
commit
fcde0271a4
|
@ -41,11 +41,16 @@ namespace cAudio
|
|||
{
|
||||
return ((IDataSource*)datasource)->getCurrentPos();
|
||||
}
|
||||
|
||||
int VorbisCloseFunc(void *datasource)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
cOggDecoder::cOggDecoder(IDataSource* stream) : IAudioDecoder(stream)
|
||||
{
|
||||
vorbisCallbacks.read_func = VorbisRead;
|
||||
vorbisCallbacks.close_func = NULL;
|
||||
vorbisCallbacks.close_func = VorbisCloseFunc;
|
||||
vorbisCallbacks.seek_func = VorbisSeek;
|
||||
vorbisCallbacks.tell_func = VorbisTell;
|
||||
Valid = (ov_open_callbacks(Stream,&oggStream,NULL,0,vorbisCallbacks) == 0);
|
||||
|
|
Loading…
Reference in New Issue