mirror of
https://github.com/mpv-player/mpv
synced 2025-01-31 04:02:06 +00:00
Respect AOPLAY_FINAL_CHUNK
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18846 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3d8cdfd839
commit
b483d64bc0
@ -495,8 +495,13 @@ static int get_space(void){
|
||||
// it should round it down to outburst*n
|
||||
// return: number of bytes played
|
||||
static int play(void* data,int len,int flags){
|
||||
len/=ao_data.outburst;
|
||||
len=write(audio_fd,data,len*ao_data.outburst);
|
||||
if(len==0)
|
||||
return len;
|
||||
if(len>ao_data.outburst || !(flags & AOPLAY_FINAL_CHUNK)) {
|
||||
len/=ao_data.outburst;
|
||||
len*=ao_data.outburst;
|
||||
}
|
||||
len=write(audio_fd,data,len);
|
||||
return len;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user