mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +00:00
AUDIO_DRAIN makes no sense directly after opening
the device, but it should be done in uninit. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26344 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f827599b48
commit
885709eadd
@ -478,8 +478,6 @@ static int init(int rate,int channels,int format,int flags){
|
||||
return 0;
|
||||
}
|
||||
|
||||
ioctl(audio_fd, AUDIO_DRAIN, 0);
|
||||
|
||||
if (af2sunfmt(format) == AUDIO_ENCODING_NONE)
|
||||
format = AF_FORMAT_S16_NE;
|
||||
|
||||
@ -583,6 +581,8 @@ static void uninit(int immed){
|
||||
// throw away buffered data in the audio driver's STREAMS queue
|
||||
if (immed)
|
||||
flush_audio(audio_fd);
|
||||
else
|
||||
ioctl(audio_fd, AUDIO_DRAIN, 0);
|
||||
close(audio_fd);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user