0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02: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:
pacman 2006-06-28 19:22:27 +00:00
parent 3d8cdfd839
commit b483d64bc0

View File

@ -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;
}