Commit 08ec4920 authored by Rafaël Carré's avatar Rafaël Carré Committed by Felix Paul Kühne

audioqueue: fixed potential TimeGet issue

Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 9eb78bf4
......@@ -167,12 +167,14 @@ static void Play (audio_output_t *p_aout, block_t *p_block)
memcpy(inBuffer->mAudioData, p_block->p_buffer, p_block->i_buffer);
inBuffer->mAudioDataByteSize = p_block->i_buffer;
p_aout->sys->i_played_length += p_block->i_length;
block_Release(p_block);
status = AudioQueueEnqueueBuffer(p_aout->sys->audioQueue, inBuffer, 0, NULL);
if (status != noErr)
if (status == noErr)
p_aout->sys->i_played_length += p_block->i_length;
else
msg_Err(p_aout, "enqueuing buffer failed (%li)", status);
block_Release(p_block);
}
void AudioQueueCallback(void * inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer) {
......
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