Mercurial > mplayer.hg
changeset 32423:4a3bfd196e17
Add support for AOPLAY_FINAL_CHUNK, reportedly also fixes a possible
hang at the end of playback.
author | reimar |
---|---|
date | Sun, 17 Oct 2010 17:39:53 +0000 |
parents | 01115062cb22 |
children | ad5550203548 |
files | libao2/ao_sun.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libao2/ao_sun.c Sun Oct 17 16:10:17 2010 +0000 +++ b/libao2/ao_sun.c Sun Oct 17 17:39:53 2010 +0000 @@ -665,9 +665,11 @@ // it should round it down to outburst*n // return: number of bytes played static int play(void* data,int len,int flags){ - if (len < ao_data.outburst) return 0; + if (!(flags & AOPLAY_FINAL_CHUNK)) { len /= ao_data.outburst; len *= ao_data.outburst; + } + if (len <= 0) return 0; len = write(audio_fd, data, len); if(len > 0) {