diff options
author | Chris Robinson <[email protected]> | 2014-05-10 07:56:41 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-05-10 07:57:35 -0700 |
commit | 3e28fb33a39b93ffaffd6a45b0b56fd60af68ecb (patch) | |
tree | 94bb99100bb1e6c29b31e52e45f0e31c20800b55 /OpenAL32/alSource.c | |
parent | 9e25ea8666924e6782ae661127f50b6a081181c9 (diff) |
Add a missing pointer init
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 37c7f472..08d8d872 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -2462,7 +2462,7 @@ static ALint64 GetSourceOffset(const ALsource *Source) static ALdouble GetSourceSecOffset(const ALsource *Source) { const ALbufferlistitem *BufferList; - const ALbuffer *Buffer; + const ALbuffer *Buffer = NULL; ALuint64 readPos; if(Source->state != AL_PLAYING && Source->state != AL_PAUSED) @@ -2519,8 +2519,8 @@ static ALvoid GetSourceOffsets(const ALsource *Source, ALenum name, ALdouble *of /* NOTE: This is the offset into the *current* buffer, so add the length of * any played buffers */ - readPos = Source->position; totalBufferLen = 0; + readPos = Source->position; BufferList = Source->queue; while(BufferList != NULL) { @@ -2528,9 +2528,9 @@ static ALvoid GetSourceOffsets(const ALsource *Source, ALenum name, ALdouble *of readFin = readFin || (BufferList == Source->current_buffer); if((buffer=BufferList->buffer) != NULL) { + if(!Buffer) Buffer = buffer; totalBufferLen += buffer->SampleLen; if(!readFin) readPos += buffer->SampleLen; - if(!Buffer) Buffer = buffer; } BufferList = BufferList->next; } |