SDL_OpenAudio failed

Hello,

Currently I’m writing a simple video player with libav. I use SDL to output
the video and audio.
It’s fairly strange that sometimes SDL_OpenAudio would complain device is
busy so it cannot open the audio device.
On the other hand, in the sample code of libav, SDL_OpenAudio is called the
same way, but it could work all the time.

Now, my question is, what will cause SDL_OpenAudio fail? Why it said device
was busy?
Maybe you don’t know libav well – it’s ok. You could answer me these two
questions, and I will check my code myself.

Thanks.

wecing.