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:
parent
3d8cdfd839
commit
b483d64bc0
@ -495,8 +495,13 @@ static int get_space(void){
|
|||||||
// it should round it down to outburst*n
|
// it should round it down to outburst*n
|
||||||
// return: number of bytes played
|
// return: number of bytes played
|
||||||
static int play(void* data,int len,int flags){
|
static int play(void* data,int len,int flags){
|
||||||
len/=ao_data.outburst;
|
if(len==0)
|
||||||
len=write(audio_fd,data,len*ao_data.outburst);
|
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;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user